summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-11-29Add support for expiring filesEmi Simpson
SUPPLEMENTALLY: - Add an `expiration` field to the `file` table of the database - Produce a migration for the above change - Overhaul the cleanup script, and integrate into fhost.py (now run using FLASK_APP=fhost flask prune) - Replace the old cleanup script with a deprecation notice - Add information about how to expire files to the index - Update the README with information about the new script Squashed commits: Add a note explaining that expired files aren't immediately removed Show correct times on the index page graph Improve the migration script, removing the need for --legacy Use automap in place of an explicit file map in migration Remove vestigial `touch()` Don't crash when upgrading a fresh database Remove vestigial warning about legacy files More efficiently filter to unexpired files when migrating https://git.0x0.st/mia/0x0/pulls/72#issuecomment-224 Coalesce updates to the database during migration https://git.0x0.st/mia/0x0/pulls/72#issuecomment-226 Remove vestigial database model https://git.0x0.st/mia/0x0/pulls/72#issuecomment-261 prune: Stream expired files from the database (as opposed to collecting them all first) config.example.py: Add min & max expiration + description
2022-11-28config.example.py: Clarify MIME ext mappingMia Herkt
2022-11-28Add example configuration fileEmber Hearth
See #73.
2022-11-20README: Clarify why serving file requests from the app is badMia Herkt
2022-11-20README: Clarify how to change configurationMia Herkt
2022-08-19README: Warn users about URL fetch network security implicationsMia Herkt
2022-08-11Fix non-seekable file handlesMia Herkt
Closes #59
2022-08-01Open upload blacklist in text modeMia Herkt
This wasn’t working since Flask opens files in bin mode by default.
2022-01-01Fix mime splittingAlexey Sakovets
mime[:mime.find(";")] will remove last character if mime does not contain ";". Use mime.split(";") instead.
2021-12-01remove short_url and add in-tree URLencoder (#53)mia
This PR removes the short_url dependency as per issue #41. This implementation is pretty much the same as in short_url except I've rewritten the enbase() function to be iterative instead of recursive. The only functions of the class are enbase() and debase() since those were the only functions being used by fhost. Co-authored-by: 7415963987456321 <hrs70@hi.is> Reviewed-on: https://git.0x0.st/mia/0x0/pulls/53 Co-authored-by: mia <mia@0x0.st> Co-committed-by: mia <mia@0x0.st>
2021-08-06Fix some flake8 errors in cleanup and nsfw_detectNikolas Nyby
Just some minor code cleanup
2021-05-23Support instance templatesMia Herkt
2021-05-23Add testsMia Herkt
2021-05-23Support client-defined names in file URL routingMia Herkt
This allows requests like /j4Tf.bin/myfilename.dat to be served without having to rewrite URLs at the frontend server.
2021-05-23Move storage to classes, support double suffixesMia Herkt
2021-05-23Use pathlibMia Herkt
2021-05-23Update READMEMia Herkt
2021-05-23Update requirements.txtMia Herkt
2021-05-23Drop Flask-ManagerMia Herkt
2021-05-23Drop dump_urls endpointMia Herkt
who cares lol (originally added for issue #1 but they never archived 0x0)
2021-05-23Use template responsesMia Herkt
2021-05-23Support instance configMia Herkt
2021-05-23Add mailmapMia Herkt
2020-11-03Add text/plain exception for .log name extensionMia Herkt
Fixes #29
2020-11-03Change license to EUPLMia Herkt
2019-04-30Update requirements.txtMartin Herkt
2018-12-22Disable NSFW detection by defaultMartin Herkt
See #11
2018-01-09add extension override for audio/flacMartin Herkt
2017-12-22Add extension override for text/x-diffMartin Herkt
2017-11-08Add command to delete all files uploaded by addressMartin Herkt
2017-11-08Fix indent error in queryblMartin Herkt
2017-10-30store_url: only accept identity content encodingMartin Herkt
Some servers (like IPFS gateways) will use chunked transfer encoding on anything but identity content encoding. Also, probably fix a potential zip bomb vulnerability.
2017-10-27Tweak NSFW thresholdMartin Herkt
Of course it’ll have a few false positives, but this seems to work well with the 0x0.st dataset.
2017-10-27Faster query commands, add removed query filterMartin Herkt
2017-10-27Add NSFW filter to address query commandsMartin Herkt
2017-10-27Add NSFW detectionMartin Herkt
2017-10-27Add querybl command to query uploads by addresses in blacklistMartin Herkt
2017-03-27Fix try/except syntaxMartin Herkt
2017-02-03Add support for upload IP blacklistsMartin Herkt
The format is one address per line, with # used for comments.
2017-01-01add more URL validationMartin Herkt
Turns out ShareX users and shell script authors are fucking retarded.
2017-01-01add BEACON dump with start index for urlte.amMartin Herkt
fixes #1
2017-01-01do not shorten our host URLsMartin Herkt
Turns out ShareX users are fucking retarded.
2017-01-01use function to format host URLMartin Herkt
2016-11-23fix text/ MIME charset workaround for realMartin Herkt
2016-11-01fix text/ MIME charset workaroundMartin Herkt
2016-11-01initMartin Herkt