{ "info": { "author": "Jonas Wielicki", "author_email": "jonas@wielicki.name", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Operating System :: POSIX", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3 :: Only", "Topic :: Communications :: Chat", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: XMPP" ], "description": "XMPP HTTP Upload Service\n########################\n\nThis provides a Flask-based HTTP service which can be used with\n`mod_http_upload_external `_.\n\nConfiguration\n=============\n\nThe configuration file is specified using the environment variable\n``XMPP_HTTP_UPLOAD_CONFIG``. It must contain the full path to the configuration\nfile.\n\nThe configuration file must contain the following keys:\n\n``SECRET_KEY``\n A ``bytes`` object which is the shared secret between the Prosody module\n and this service. See the `mod_http_upload_external documentation\n `_ for details.\n\n``DATA_ROOT``\n Path to the directory where the service stores the uploaded files.\n\n``NON_ATTACHMENT_MIME_TYPES``\n A list of string globs which specify the content types which are *not* sent\n as attachment. Defaults to the empty list if not given.\n\n Example use::\n\n NON_ATTACHMENT_MIME_TYPES = [\n \"image/*\",\n \"video/*\",\n \"audio/*\",\n \"text/plain\",\n ]\n\n Everything which does not match any of the entries here will be sent with\n ``Content-Disposition: attachment`` in order to prevent funny attacks.\n\n It is not recommended to add things like ``text/html`` or ``*`` to this\n list.\n\n``ENABLE_CORS``\n Allow cross-origin access to all endpoints unconditionally. This is needed\n to allow web clients to use the upload feature.\n\nIssues, Bugs, Limitations\n=========================\n\n* This service **does not handle any kind of quota**.\n* The format in which the files are stored is **not** compatible with ``mod_http_upload`` -- so you'll lose all uploaded files when switching.\n* This blindly trusts the clients Content-Type. I don't think this is a major issue, because we also tell the browser to blindly trust the clients MIME type. This, in addition with forcing all but a white list of MIME types to be downloaded instead of shown inline, should provide safety against any type of XSS attacks.\n* I have no idea about web security. The headers I set may be subtly wrong and circumvent all security measures I intend this to have. Please double-check for yourself and report if you find anything amiss.\n\nExample Installation instructions\n=================================\n\nExample instructions for debian based systems, if you don't use debian check your distributions repositories for the correct python3 flask package name.\nYou probably also want to use something else then ``apt-get`` on non debian based distributions.\n\nIn this example we will install the flask http server and proxy requests from an already installed and configured webserver (nginx) to the flask http server.\nIt is also possible to run the python script with ``wsgi`` which should yield in better performance.\n\nI assume your webserver uses ``www-data`` as service account. If you have a different user update the systemd service and the permissions for the data directory.\n\nClone and install::\n\n git clone https://github.com/horazont/xmpp-http-upload\n sudo mv xmpp-http-upload /opt/xmpp-http-upload\n cd /opt/xmpp-http-upload\n copy config.example.py config.py\n sudo apt-get install python3-flask\n\nEdit ``config.py`` and change ``SECRET_KEY``. Be sure to only change between ``''``.\n\nCreate the upload directory::\n\n sudo mkdir /var/lib/xmpp-http-upload\n sudo chown www-data.www-data /var/lib/xmpp-http-upload\n\nEnable systemd service::\n\n sudo copy contrib/xmpp-http-upload.service /etc/systemd/system\n sudo systemctl enable xmpp-http-upload.service\n sudo systemctl start xmpp-http-upload.service\n\nConfigure your webserver:\n\nAs final step you need to point your external webserver to your xmpp-http-upload flask app.\nCheck the ``contrib`` directory, there is an example for nginx there.", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/horazont/xmpp-http-upload", "keywords": "xmpp http", "license": "GPLv3+", "maintainer": "", "maintainer_email": "", "name": "xmpp-http-upload", "package_url": "https://pypi.org/project/xmpp-http-upload/", "platform": "", "project_url": "https://pypi.org/project/xmpp-http-upload/", "project_urls": { "Homepage": "https://github.com/horazont/xmpp-http-upload" }, "release_url": "https://pypi.org/project/xmpp-http-upload/0.3.0/", "requires_dist": null, "requires_python": "", "summary": "Flask-based HTTP service to handle XMPP HTTP upload requests from Prosody mod_http_upload_external", "version": "0.3.0" }, "last_serial": 3818787, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "e9b71158894d16b9fbad60f15254326d", "sha256": "451ae0abbecae08e94df47d67c21731b07eaaaf728e7b5f760c790a9bb7556ee" }, "downloads": -1, "filename": "xmpp-http-upload-0.1.tar.gz", "has_sig": false, "md5_digest": "e9b71158894d16b9fbad60f15254326d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1804, "upload_time": "2017-11-15T15:41:18", "url": "https://files.pythonhosted.org/packages/f3/f9/56fb68a7af649dcbac00d9f075e292c62bf3fff9d9734bd21ee84290bffe/xmpp-http-upload-0.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "2b28036c7f230e3dd9ddd2f8e8dcb0c3", "sha256": "e1c688f077a19318b1b763aab5a6985278e0a7971aa35f613872eafca9df362f" }, "downloads": -1, "filename": "xmpp-http-upload-0.2.0.tar.gz", "has_sig": false, "md5_digest": "2b28036c7f230e3dd9ddd2f8e8dcb0c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15358, "upload_time": "2017-11-15T16:14:35", "url": "https://files.pythonhosted.org/packages/e3/06/ca256af425df6c0aaa5da11ace4b1f9ba85ec588d7ec076cece81ac490b8/xmpp-http-upload-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "ad5f3315a24b40301255441853b5b67b", "sha256": "3120ed011e206eef946a045c76e07d41cf24687f7022ac51c95ec051f980289c" }, "downloads": -1, "filename": "xmpp-http-upload-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ad5f3315a24b40301255441853b5b67b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17358, "upload_time": "2018-04-29T14:31:31", "url": "https://files.pythonhosted.org/packages/ae/1e/5104627a1af2080299d1edccaa75afedb6249cf2d584f4532bae887c6f7d/xmpp-http-upload-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ad5f3315a24b40301255441853b5b67b", "sha256": "3120ed011e206eef946a045c76e07d41cf24687f7022ac51c95ec051f980289c" }, "downloads": -1, "filename": "xmpp-http-upload-0.3.0.tar.gz", "has_sig": false, "md5_digest": "ad5f3315a24b40301255441853b5b67b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17358, "upload_time": "2018-04-29T14:31:31", "url": "https://files.pythonhosted.org/packages/ae/1e/5104627a1af2080299d1edccaa75afedb6249cf2d584f4532bae887c6f7d/xmpp-http-upload-0.3.0.tar.gz" } ] }