Pasteservice for your own pleasure https://www.bananas-playground.net/projekt/selfpaste/

Banana 784fc7581b Merge branch 'develop' of Banana/selfpaste into master vor 11 Monaten
client 0e2514dc87 go client updates vor 11 Monaten
documentation 7071c2280a version 1.5 vor 11 Monaten
webroot b5ff43402b server php code cleanup and php8 vor 11 Monaten
.gitignore 927bb6017e more init files vor 4 Jahren
CHANGELOG 7071c2280a version 1.5 vor 11 Monaten
COPYING a28512b410 update licence vor 11 Monaten
LICENSE a28512b410 update licence vor 11 Monaten
README 1a9f866734 cleanups vor 4 Jahren
TODO a72a6c1ba2 Multiple secrets vor 4 Jahren
USES a28512b410 update licence vor 11 Monaten
VERSION 759cff93e0 new version vor 1 Jahr

README

selfpaste is a small self hosting paste service.
https://www.bananas-playground.net/projekt/selfpaste/
It is not the aim to replace any other well known paste service.
It is an experiment and build for private use only.

This tool uses PHP fileinfo: https://www.php.net/manual/en/intro.fileinfo.php

> The functions in this module try to guess the content type and encoding of a file
> by looking for certain magic byte sequences at specific positions within the file.
> While this is not a bullet proof approach the heuristics used do a very good job.

It is not really bulletproof, but it does the job.
Everything can be manipulated to look alike something it isn't.

So, here is a friendly REMINDER:

- Use it at own risk.
- Don't open it up to the public
- Check regularly what is added
- Clean everything what you do not know
- You provide the service by hosting it. Your are responsible for it!
- Change your secret often.

# Why json as a response?
In cases the upload is over post_max_size the request will not "arrive".
Meaning the script does not receive enough information to work with.
In this case it returns the start page. Which is a valid HTTP 200 status response.
So the client can not only rely on the HTTP status code alone.

# Third party resources
Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/