From: Banana Date: Fri, 14 Aug 2020 17:24:00 +0000 (+0200) Subject: cleanups X-Git-Tag: v1.2 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F4%2Fhead;p=selfpaste.git cleanups --- diff --git a/CHANGELOG b/CHANGELOG index e5e1178..6aad23c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,6 @@ +202008xx version 1.2 Carbon +* Cleanup version only. No new fetures + 20200530 version 1.1 Boron * House cleaning * Added a simple web client diff --git a/README b/README index 92909dc..49a9397 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ 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 know paste service. It is an experiment -and build for private use only. +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 @@ -9,12 +9,12 @@ This tool uses PHP fileinfo: https://www.php.net/manual/en/intro.fileinfo.php > 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. +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 at own risk. + - 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 @@ -22,10 +22,10 @@ So, here is a friendly REMINDER: - Change your secret often. # Why json as a response? -In cases the upload is over post_max_size the request will not be "arrive". +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 we return the start page. Which is a valid HTTP 200 status response. -So the client can not only rely in the HTTP status code alone. +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/ \ No newline at end of file +Link shortening inspired and some code used from: https://www.jwz.org/base64-shortlinks/ diff --git a/VERSION b/VERSION index b5d737b..4ed135d 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.1 Boron +1.2 Carbon diff --git a/client/c-client-linux/README b/client/c-client-linux/README index db1354b..9fa5157 100644 --- a/client/c-client-linux/README +++ b/client/c-client-linux/README @@ -1,2 +1,2 @@ -Linux client written in C. Can be build with the added Makefile for linux +Linux client written in C. Can be build with the added Makefile for linux. Depends on libcurl (+ssl) https://curl.haxx.se and json-c https://github.com/json-c/json-c diff --git a/client/c-client-win/README b/client/c-client-win/README index 9634b87..edbdd84 100644 --- a/client/c-client-win/README +++ b/client/c-client-win/README @@ -12,5 +12,5 @@ Use at own risk and feel free to improve. Howto build: - gcc from https://jmeubank.github.io/tdm-gcc/ (build with tdm64-gcc-9.2.0) -Run the makefile.bat in a cmd terminal. -Resulting selfpaste.exe and needed dll are in bin/ directory. \ No newline at end of file +- Run the makefile.bat in a cmd terminal. +- Resulting selfpaste.exe and needed dlls are in bin/ directory. diff --git a/client/webclient/README b/client/webclient/README index f8d4a19..8a13384 100644 --- a/client/webclient/README +++ b/client/webclient/README @@ -1,7 +1,7 @@ The webclient provides a simple web client to add pasties on the go when no client is available. It is a simple basic auth protected script which will then add the new pasty to your installation. -To enable the webclient read the details in the index.php and config.default. file. +To enable the webclient read the details in the index.php and config.default.php file. Copy config.default.php to config.php and provide a username, password, secret and the selfpaste endpoint url. Upload it where you want it and go. diff --git a/documentation/clean-cronjob.txt b/documentation/clean-cronjob.txt index 1de9791..7069c63 100644 --- a/documentation/clean-cronjob.txt +++ b/documentation/clean-cronjob.txt @@ -18,7 +18,7 @@ * rename this file into a php file and create a cronjob which executes this file as * php cli command * - * example runs very sunday : 0 0 * * 0 php /path/to/this/file.php + * example runs every sunday : 0 0 * * 0 php /path/to/this/file.php * * you need to change PATH_TO_MANCUBUS_CLASS to find the required PHP class */ @@ -44,4 +44,4 @@ require_once(PATH_TO_MANCUBUS_CLASS); if($verbose == true) echo "Selfpaste cleanup start\n"; $mancubus = new Mancubus(); $mancubus->cleanupCronjob($verbose); -if($verbose == true) echo "Selfpaste cleanup end\n"; \ No newline at end of file +if($verbose == true) echo "Selfpaste cleanup end\n"; diff --git a/documentation/clients.txt b/documentation/clients.txt index 7bf24a6..d288de7 100644 --- a/documentation/clients.txt +++ b/documentation/clients.txt @@ -5,6 +5,9 @@ make sure you change ENDPOINT and SELFPASTE_UPLOAD_SECRET. A C client is available to be build with makefile. Build and see included help for more information. +A C client for windows is also available can be build with the provided +information in the right folder. + Requirements to create a new client are: - Talk to the selfpaste endpoint over HTTP(S) (your choice) diff --git a/documentation/filetypes.txt b/documentation/filetypes.txt index 9e7c867..170104d 100644 --- a/documentation/filetypes.txt +++ b/documentation/filetypes.txt @@ -4,10 +4,10 @@ This tool uses PHP fileinfo: https://www.php.net/manual/en/intro.fileinfo.php > 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 bullet proof, but it does the job. Everything can be manipulated +It is not really bulletproof, but it does the job. Everything can be manipulated to look alike something it isn't. To expand or reduce the allowed filetypes, edit the SELFPASTE_ALLOWED_FILETYPES string to your needs. Again READ the README and security info! -Read more about filetypes here: https://www.iana.org/assignments/media-types/media-types.xhtml \ No newline at end of file +Read more about filetypes here: https://www.iana.org/assignments/media-types/media-types.xhtml diff --git a/documentation/requirements.txt b/documentation/requirements.txt index 70a5c92..1a1f05c 100644 --- a/documentation/requirements.txt +++ b/documentation/requirements.txt @@ -3,4 +3,7 @@ Apache >= 2.4 - mod_deflate - mod_rewrite - htaccess support AllowOverride All -Bash, curl and jq for included bash client \ No newline at end of file + +Bash, curl and jq for included bash client. + +More dependencies for each client can be found in the individual readmes. diff --git a/webroot/.gitignore b/webroot/.gitignore new file mode 100644 index 0000000..4f4773f --- /dev/null +++ b/webroot/.gitignore @@ -0,0 +1 @@ +config.php