Skip to content

A python flask webserver/uwsgi implementation for the prosody community module mod_http_upload_external

License

Notifications You must be signed in to change notification settings

the8woodcutter/xmppupload

Repository files navigation

Prosody XMPP HTTP Upload External Service Using Flask


This provides a Flask-based HTTP service which can be used with mod_http_upload_external <https://modules.prosody.im/mod_http_upload_external.html>

Configuration


In Process... ..can't find the jobsite, still soooooo hung over..

Issues, Bugs, Limitations


This service does not handle any kind of quota.

  • The format in which the files are stored is not compatible with mod_http_upload -- so you'll lose all uploaded files when switching.

  • 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.
  • I cannot brag about being no master of webservers, and sysops instruments to handle HTTP, so please don't set it and forget it, run it and get mad it doesn't work, read the damn code!

    • There are seriously soooooo many ways to use uWSGI for a web server gateway interface between flask and webserver, one should consider just how many points of failure, as well as confusable or mixeable things exist with the sheer complexity of the extra uWSGI

I SERIOUSLY ONLY PROMOTE USE WITH A VIRTUALENV

  • Be aware this code is unlikely to be in operable shape, as I'm speaking of this date, and it's new fork of mine, this is not meant to be digested by the public, though publicly open, I am using it for my own private user prosody XMPP server. TooFast.vip & Soon To Also Offer Registration: [Packets.Cc]{xmpp:packets.cc}
    • Despite that I make good attenpt to offer this work properly open source.

Example Installation instructions


In Process... ...meaning under construction, but I forgot my hard hat..

PROJECT NEWS:

September 15 2024

* Ahoy!  I am doing a process of elimination, I am setting in reverse back through the code, going to try to do my due diligence to actually read and understand the documentation for builtins like `hmac`, `hashlib`, `contextlib` (or something like that) and closely prune and comment through the existing code, offer my differences, refactoring every extensible part, where I might want to use differing `flask` logic, or similar but different functions and flows than pre-exist.
	* Originally I found that setting this up for the system, with manually using setuptools, a setup.py, no virtual environment and worse yet running nginx directly on flask's own WSGI interface, nooooooo, I absolutely had to refactor that to a more performant uWSGI and it's been a struggle.
		* I am only on my first major refactor of this project, so that's even a bit exciting!
		* `python-dotenv` **DOES NOT WORK** with virtual environment and uWSGI, I simply cannot find any, even a little, information to guide me in understandng why it beligerantly refuses to use `os.environ.get('SECRET_KEY')`
			* I HAVE REWRITTEN THIS PART, EVEN TO RAW PARSING TEXT FILES, 4 OR 5 TIMES NOW!!!!
			* I give up on python-dotenv, and will IGNORE it from now on, no
	* `/xmppupload/` being my personal URI directory preceding uploads, added my easy enjoyment of making pages and URI/URL magic things, PLUS this being based on `flask` which I'm FAST becoming A BIG FAN, cool stuff comes to mind ^^
* This news might not get updated any time soon, and perhaps many many things have changed, so it wuz written on September 15th 2024, check ur clocks if you think I was bluffing 3 years ago...

					  >-->> --* --- *---- ----=>-<
				✰ᖶᕼᘿ8ᘺᓍᓍᕲᑢᑘᖶᖶᘿᖇ.𝕾ᕼ✰
			>:[Sep15]|\\ >-->> ------ ----=>-< [2024]]:<-

About

A python flask webserver/uwsgi implementation for the prosody community module mod_http_upload_external

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published