From f35494491e5b94752108059c6a7d68f4db95a9c6 Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix whitespace --- Gruntfile.js | 6 +- moe/includes/api.php | 1 + moe/index.php | 1 + moe/panel/index.php | 119 +++++++++++++++++++------------------- pages/ca.swig | 6 +- pages/check_fileapica.swig | 2 +- pages/check_scriptca.swig | 2 +- pages/faq.swig | 24 ++++---- pages/index.swig | 8 +-- pages/layout.swig | 24 ++++---- pages/layoutca.swig | 24 ++++---- pages/nav.swig | 16 ++--- pages/nojs.swig | 8 +-- pages/other.swig | 7 +-- static/classes/Response.class.php | 8 +-- 15 files changed, 127 insertions(+), 129 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 70cbfbe..96fbab2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,9 +18,9 @@ module.exports = function (grunt) { 'index.swig', 'faq.swig', 'tools.swig', - 'other.swig', - 'nojs.swig', - 'ca.swig' + 'other.swig', + 'nojs.swig', + 'ca.swig' ], siteUrl: 'https://pantsu.cat/', production: false, diff --git a/moe/includes/api.php b/moe/includes/api.php index b85cbbf..634cd74 100644 --- a/moe/includes/api.php +++ b/moe/includes/api.php @@ -1,4 +1,5 @@ - - Moe Panel - - - - - - - - - - - - - -
- - - - - -
- - -
-
-

- -
- - - -
-
- - - -
- - + + Moe Panel + + + + + + + + + + + + +
+ + + +
+ +
+
+

+ +

+ +
+ + + +
+
+ + +
+ diff --git a/pages/ca.swig b/pages/ca.swig index 68c7b97..a15a7d5 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -2,9 +2,9 @@ {% block body %}
-
-

Roba Interior~

-
+
+

Roba Interior~

+

Màxima grandària de pujada {{max_upload_size}}MiB, read the FAQ

{% include "check_scriptca.swig" %} {% include "check_fileapica.swig" %} diff --git a/pages/check_fileapica.swig b/pages/check_fileapica.swig index a3e8120..1797a9b 100644 --- a/pages/check_fileapica.swig +++ b/pages/check_fileapica.swig @@ -1,3 +1,3 @@

- El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3 + El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3

diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig index 0a5f0ea..3c8b01a 100644 --- a/pages/check_scriptca.swig +++ b/pages/check_scriptca.swig @@ -1,3 +1,3 @@ diff --git a/pages/faq.swig b/pages/faq.swig index 320f4b4..dca3c80 100644 --- a/pages/faq.swig +++ b/pages/faq.swig @@ -3,20 +3,20 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

FAQ

-{% include "nav.swig" %} +

FAQ

+ {% include "nav.swig" %}
{% include "banners.swig" %} {% endblock %} diff --git a/pages/index.swig b/pages/index.swig index 8a1635e..3335661 100644 --- a/pages/index.swig +++ b/pages/index.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_script.swig" %} {% include "check_fileapi.swig" %} diff --git a/pages/layout.swig b/pages/layout.swig index 7daaf0b..d887a3e 100644 --- a/pages/layout.swig +++ b/pages/layout.swig @@ -1,15 +1,15 @@ - - - - Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/layoutca.swig b/pages/layoutca.swig index 92f9824..54c54d6 100644 --- a/pages/layoutca.swig +++ b/pages/layoutca.swig @@ -1,15 +1,15 @@ - - - - Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/nav.swig b/pages/nav.swig index 5864c43..cd2f43d 100644 --- a/pages/nav.swig +++ b/pages/nav.swig @@ -1,11 +1,11 @@ diff --git a/pages/nojs.swig b/pages/nojs.swig index c526688..91d1105 100644 --- a/pages/nojs.swig +++ b/pages/nojs.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_fileapi.swig" %} {% include "upload_form_nojs.swig" %} diff --git a/pages/other.swig b/pages/other.swig index 2efb119..4071fb5 100644 --- a/pages/other.swig +++ b/pages/other.swig @@ -3,12 +3,11 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

Other Services

+

Other Services

{% include "nav.swig" %} {% endblock %} - diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 951e39e..b7e4c5d 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -17,7 +17,7 @@ class Response $this->type = $response_type; break; - case 'html': + case 'html': header('Content-Type: text/html;charset=utf-8'); $this->type = 'html'; break; @@ -118,7 +118,7 @@ class Response $result .= $file['url']."\n"; } - return $result; + return $result; } private static function html_error($code, $description) @@ -129,10 +129,10 @@ class Response private static function html_success($files) { foreach ($files as $file) { - $result .= "".$file['url']."
"; + $result .= ''.$file['url'].'
'; } - return $result; + return $result; } private static function json_error($code, $description) -- cgit v1.2.3 From dbc1450225a3ebc4633f4d3b76bb8ad133f6ace7 Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix README.md outline --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4cf35fe..87b9efb 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,11 @@ Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to work with Apache 2.4 and newer PHP versions. Should work with any other PDO-compatible database. -# Install +## Install For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL, Node, or NPM. So we'll just assume you already have them all running well. -## Compiling +### Compiling The assets are minified and combined using [Grunt](http://gruntjs.com/). Assuming you already have Node and NPM working, compilation is easy: @@ -19,14 +19,14 @@ $ grunt ``` After this, the pomf site is now compressed and set up inside `dist/`. -### Apache +#### Apache If you are running Apache and want to compress your output when serving files, add to your `.htaccess` file: ``` AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json ``` Remember to enable `deflate_module` and `filter_module` modules in your Apache configuration file. -## Configuring +### Configuring The majority of settings are in `static/includes/settings.inc.php`. Read the comments in that file for more information. @@ -42,5 +42,5 @@ Make sure to disable PHP from being executed on the file download domain/directo * Clean up Moe code, a lot.. * API keys? -# Contact +## Contact I can be contacted via hostmaster@pantsu.cat. -- cgit v1.2.3 From a3025ca5bb4113ec069770d9b24659a3e229ec9d Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix whitespace --- Gruntfile.js | 6 +- moe/includes/api.php | 1 + moe/index.php | 1 + moe/panel/index.php | 119 +++++++++++++++-------------- pages/ca.swig | 6 +- pages/check_fileapica.swig | 2 +- pages/check_scriptca.swig | 2 +- pages/faq.swig | 24 +++--- pages/index.swig | 8 +- pages/layout.swig | 24 +++--- pages/layoutca.swig | 24 +++--- pages/nav.swig | 16 ++-- pages/nojs.swig | 8 +- pages/other.swig | 7 +- pages/tools.swig | 153 ++++++++++++++++++++++++-------------- static/classes/Response.class.php | 8 +- 16 files changed, 223 insertions(+), 186 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 70cbfbe..96fbab2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -18,9 +18,9 @@ module.exports = function (grunt) { 'index.swig', 'faq.swig', 'tools.swig', - 'other.swig', - 'nojs.swig', - 'ca.swig' + 'other.swig', + 'nojs.swig', + 'ca.swig' ], siteUrl: 'https://pantsu.cat/', production: false, diff --git a/moe/includes/api.php b/moe/includes/api.php index b85cbbf..634cd74 100644 --- a/moe/includes/api.php +++ b/moe/includes/api.php @@ -1,4 +1,5 @@ - - Moe Panel - - - - - - - - - - - - - -
- - - - - -
- - -
-
-

- -
- - - -
-
- - - -
- - + + Moe Panel + + + + + + + + + + + + +
+ + + +
+ +
+
+

+ +

+ +
+ + + +
+
+ + +
+ diff --git a/pages/ca.swig b/pages/ca.swig index 68c7b97..a15a7d5 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -2,9 +2,9 @@ {% block body %}
-
-

Roba Interior~

-
+
+

Roba Interior~

+

Màxima grandària de pujada {{max_upload_size}}MiB, read the FAQ

{% include "check_scriptca.swig" %} {% include "check_fileapica.swig" %} diff --git a/pages/check_fileapica.swig b/pages/check_fileapica.swig index a3e8120..1797a9b 100644 --- a/pages/check_fileapica.swig +++ b/pages/check_fileapica.swig @@ -1,3 +1,3 @@

- El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3 + El seu navegador és una merda. Instal l'última Firefox o Botnet i tornar <3

diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig index 0a5f0ea..3c8b01a 100644 --- a/pages/check_scriptca.swig +++ b/pages/check_scriptca.swig @@ -1,3 +1,3 @@ diff --git a/pages/faq.swig b/pages/faq.swig index 320f4b4..dca3c80 100644 --- a/pages/faq.swig +++ b/pages/faq.swig @@ -3,20 +3,20 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

FAQ

-{% include "nav.swig" %} +

FAQ

+ {% include "nav.swig" %}
    -
  • Pantsu does NOT support Internet Explorer and older versions of Firefox, Chrome, Opera and Safari.
  • -
  • Uploading tools for Pantsu can be found at Tools. (Currently working to update them all to work with pantsu.cat)
  • -
  • Max file size is {{max_upload_size}}MiB, hopefully I won't have to change this to a even lower number. (read: don't be an ass).
  • -
  • No Child porn, anything else goes until I get a lawsuit I guess. (unless its a virus, because that goes into the being an ass category).
  • -
  • All filetypes are allowed, ALL! (gif,exe,jpg,rar,ass,srt,etc,etc).
  • -
  • No data is collected or logged by us. This won't change. Cloudflare isn't in use
  • -
  • Please contact me at contact@pantsu.cat for any questions.
  • -
  • If you wish to send me any DMCA requests please contact me at transparency information page.
  • +
  • Pantsu does NOT support Internet Explorer and older versions of Firefox, Chrome, Opera and Safari.
  • +
  • Uploading tools for Pantsu can be found at Tools. (Currently working to update them all to work with pantsu.cat)
  • +
  • Max file size is {{max_upload_size}}MiB, hopefully I won't have to change this to a even lower number. (read: don't be an ass).
  • +
  • No Child porn, anything else goes until I get a lawsuit I guess. (unless its a virus, because that goes into the being an ass category).
  • +
  • All filetypes are allowed, ALL! (gif,exe,jpg,rar,ass,srt,etc,etc).
  • +
  • No data is collected or logged by us. This won't change. Cloudflare isn't in use
  • +
  • Please contact me at contact@pantsu.cat for any questions.
  • +
  • If you wish to send me any DMCA requests please contact me at transparency information page.
{% include "banners.swig" %} {% endblock %} diff --git a/pages/index.swig b/pages/index.swig index 8a1635e..3335661 100644 --- a/pages/index.swig +++ b/pages/index.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_script.swig" %} {% include "check_fileapi.swig" %} diff --git a/pages/layout.swig b/pages/layout.swig index 7daaf0b..d887a3e 100644 --- a/pages/layout.swig +++ b/pages/layout.swig @@ -1,15 +1,15 @@ - - - - Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Pantsu.cat · {% block title %}Kawaii File Hosting{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/layoutca.swig b/pages/layoutca.swig index 92f9824..54c54d6 100644 --- a/pages/layoutca.swig +++ b/pages/layoutca.swig @@ -1,15 +1,15 @@ - - - - Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/pages/nav.swig b/pages/nav.swig index 5864c43..cd2f43d 100644 --- a/pages/nav.swig +++ b/pages/nav.swig @@ -1,11 +1,11 @@ diff --git a/pages/nojs.swig b/pages/nojs.swig index c526688..91d1105 100644 --- a/pages/nojs.swig +++ b/pages/nojs.swig @@ -2,10 +2,10 @@ {% block body %}
-
-

Pantsu~

-

Ropa Interior~

-
+
+

Pantsu~

+

Ropa Interior~

+

Max upload size is {{max_upload_size}}MiB, read the FAQ

{% include "check_fileapi.swig" %} {% include "upload_form_nojs.swig" %} diff --git a/pages/other.swig b/pages/other.swig index 2efb119..4071fb5 100644 --- a/pages/other.swig +++ b/pages/other.swig @@ -3,12 +3,11 @@ {% block title %}FAQ{% endblock %} {% block body %}
-

Other Services

+

Other Services

{% include "nav.swig" %} {% endblock %} - diff --git a/pages/tools.swig b/pages/tools.swig index f82e8e4..2632f5f 100644 --- a/pages/tools.swig +++ b/pages/tools.swig @@ -6,83 +6,122 @@

Pomf Tools

{% include "nav.swig" %}
-

Pomfit

-
Download
-
https://github.com/pantsucat/pomfit
-
Contact
+
+

Pomfit

+
+
Download
+
https://github.com/pantsucat/pomfit
+
Contact
https://twitter.com/Senketsu_Dev
-
-

Bash Pomf Uploader

-
Download
+
+
+
+

Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/b46320a4103afda4e0ff
-
Contact
+
Contact
https://twitter.com/AnonymousLink
-
-

Simple Bash Pomf Uploader

-
Download
+
+
+
+

Simple Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/da46d56e22063704604a
-
Contact
+
Contact
https://twitter.com/dev_console
-
-

limf

-
Download
-
https://github.com/lich/limf
-
Contact
-
http://lich.github.io//
-
-

1339secure

-
Download
-
https://github.com/pantsucat/1339secure
-
Contact
-
adriankoshcha@teknik.io
-
-

Python Pomf Uploader

-
Download
+
+
+
+

limf

+
+
Download
+
https://github.com/lich/limf
+
Contact
+
http://lich.github.io//
+
+
+
+

1339secure

+
+
Download
+
https://github.com/pantsucat/1339secure
+
Contact
+
adriankoshcha@teknik.io
+
+
+
+

Python Pomf Uploader

+
+
Download
https://github.com/pantsucat/POMF
-
Contact
+
Contact
https://twitter.com/FuzzyPomf
-
-

Sharex

-
Download
+
+
+
+

Sharex

+
+
Download
https://code.google.com/p/sharex/
-
Settings
+
Settings
https://p.pantsu.cat/view/raw/b79ea507
-
-

Scotty

-
Download
+
+
+
+

Scotty

+
+
Download
https://github.com/pantsucat/Scotty
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Gyazo Client (Puush like client)

-
Download
+
+
+
+

Gyazo Client (Puush like client)

+
+
Download
https://github.com/pantsucat/gyazowin
-
Contact
+
Contact
https://twitter.com/4vailable
-
-

Bash Screenshot Uploader

-
Download
+
+
+
+

Bash Screenshot Uploader

+
+
Download
https://gist.github.com/aki--aki/6258422
-
Contact
+
Contact
https://twitter.com/__akiaki
-
-

Pomf.se Windows Client Dead

-
Download
+
+
+
+

Pomf.se Windows Client Dead

+
+
Download
http://mavanmanen.nl/index.php?page=projects
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

ScrotUP Dead

-
Download
+
+
+
+

ScrotUP Dead

+
+
Download
https://github.com/mavanmanen/ScrotUP
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Perl Pomf Uploaer Dead

-
Download
+
+
+
+

Perl Pomf Uploaer Dead

+
+
Download
http://p.pomf.se/624
-
Contact
+
Contact
Kori
-
+
+
{% endblock %} diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 951e39e..b7e4c5d 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -17,7 +17,7 @@ class Response $this->type = $response_type; break; - case 'html': + case 'html': header('Content-Type: text/html;charset=utf-8'); $this->type = 'html'; break; @@ -118,7 +118,7 @@ class Response $result .= $file['url']."\n"; } - return $result; + return $result; } private static function html_error($code, $description) @@ -129,10 +129,10 @@ class Response private static function html_success($files) { foreach ($files as $file) { - $result .= "".$file['url']."
"; + $result .= ''.$file['url'].'
'; } - return $result; + return $result; } private static function json_error($code, $description) -- cgit v1.2.3 From 2a0bc6e20ce1e348962301eadb055f1d5971e1de Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix README.md outline --- README.md | 71 ++++++++++++++++++++++++++++++++++++++++++--------------------- wub.patch | 18 ++++++++++++++++ 2 files changed, 65 insertions(+), 24 deletions(-) create mode 100644 wub.patch diff --git a/README.md b/README.md index 4cf35fe..213bf90 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,69 @@ # Pomf -Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to work with Apache 2.4 -and newer PHP versions. Should work with any other PDO-compatible database. -# Install +Pomf is a simple file uploading and sharing platform. + +Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to +work with Apache 2.4 and newer PHP versions. Should work with any other +PDO-compatible database. + +## Install + For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL, -Node, or NPM. So we'll just assume you already have them all running well. +Node, or NPM. So we'll just assume you already have them all running well. + +### Compiling -## Compiling The assets are minified and combined using [Grunt](http://gruntjs.com/). -Assuming you already have Node and NPM working, compilation is easy: -``` -$ npm install -g grunt-cli -$ git clone git://github.com/pantsucat/pomf.git -$ cd pomf/ -$ npm install -$ grunt -``` -After this, the pomf site is now compressed and set up inside `dist/`. +Assuming you already have Node and NPM working, compilation is easy. Use the +following shell code: -### Apache -If you are running Apache and want to compress your output when serving files, add to your `.htaccess` file: ``` -AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +npm install -g grunt-cli +git clone git://github.com/pantsucat/pomf.git +cd pomf/ +npm install +grunt ``` -Remember to enable `deflate_module` and `filter_module` modules in your Apache configuration file. + +After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of settings are in `static/includes/settings.inc.php`. Read the + +The majority of settings are in `static/includes/settings.inc.php`. Read the comments in that file for more information. -For file size configuration, there is no server-side verification: we assume -that PHP and Nginx provide ample protection in this department. There is, +For file size configuration, there is no server-side verification: we assume +that PHP and Nginx provide ample protection in this department. There is, however, client-side configuration for max size, the `data-max-size` attribute on the file input in `pages/upload_form.swig`. -Make sure to disable PHP from being executed on the file download domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious .php file and execute it on your server. +Make sure to disable PHP from being executed on the file download +domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious +.php file and execute it on your server. + +### Apache + +If you are running Apache and want to compress your output when serving files, +add to your `.htaccess` file: + +``` +AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +``` + +Remember to enable `deflate_module` and `filter_module` modules in your Apache +configuration file. ## Todo * Clean up Moe code, a lot.. * API keys? -# Contact -I can be contacted via hostmaster@pantsu.cat. +## License + +Pomf is free software, and is released under the terms of the MIT (Expat) +license. See LICENSE. + +## Contact + +The maintainer can be contacted via hostmaster@pantsu.cat. diff --git a/wub.patch b/wub.patch new file mode 100644 index 0000000..7f0e620 --- /dev/null +++ b/wub.patch @@ -0,0 +1,18 @@ +diff --git a/README.md b/README.md +index 646bea3..213bf90 100644 +--- a/README.md ++++ b/README.md +@@ -30,11 +30,11 @@ After this, the pomf site is now compressed and set up inside `dist/`. + + ## Configuring + +-The majority of settings are in `static/includes/settings.inc.php`. Read the ++The majority of settings are in `static/includes/settings.inc.php`. Read the + comments in that file for more information. + + For file size configuration, there is no server-side verification: we assume +-that PHP and Nginx provide ample protection in this department. There is, ++that PHP and Nginx provide ample protection in this department. There is, + however, client-side configuration for max size, the `data-max-size` attribute + on the file input in `pages/upload_form.swig`. + -- cgit v1.2.3 From a7f18c03cc5f11fb1a86e368bb85f476d30370f1 Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 18:00:33 +1000 Subject: Fix typo --- pages/ca.swig | 2 +- pages/layoutca.swig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/ca.swig b/pages/ca.swig index a15a7d5..f0ce3d6 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -3,7 +3,7 @@ {% block body %}
-

Roba Interior~

+

Ropa Interior~

Màxima grandària de pujada {{max_upload_size}}MiB, read the FAQ

{% include "check_scriptca.swig" %} diff --git a/pages/layoutca.swig b/pages/layoutca.swig index 54c54d6..e522319 100644 --- a/pages/layoutca.swig +++ b/pages/layoutca.swig @@ -3,7 +3,7 @@ - Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} + Ropa Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} -- cgit v1.2.3 From a92961f24072bc4c3881bf0e2f609562f3703471 Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 10:27:07 +1000 Subject: Add text response class This allows for text only output which removes the complexity of many bash uploader scripts. --- static/classes/Response.class.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index e9f647d..c44230d 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -12,6 +12,11 @@ class Response header('Content-Type: text/plain; charset=UTF-8'); $this->type = $response_type; break; + case 'text': + header('Content-Type: text/plain; charset=UTF-8'); + $this->type = $response_type; + break; + case 'html': header('Content-Type: text/html;charset=utf-8'); $this->type = 'html'; @@ -34,6 +39,9 @@ class Response case 'gyazo': $response = $this->gyazo_error($code, $desc); break; + case 'text': + $response = $this->text_error($code, $desc); + break; case 'html': $response = $this->html_error($code, $desc); break; @@ -60,6 +68,9 @@ class Response case 'gyazo': $response = $this->gyazo_success($files); break; + case 'text': + $response = $this->text_success($files); + break; default: $response = $this->json_success($files); break; @@ -96,6 +107,20 @@ class Response { return POMF_URL.$files[0]['url']; } + private static function txt_error($code, $description) + { + return 'ERROR: ('.$code.') '.$description; + } + + private static function text_success($files) + { + foreach ($files as $file) { + $result .= POMF_URL.$files[0]['url']; + } + + return $result; + } + private static function html_error($code, $description) { return 'ERROR: ('.$code.') '.$description; -- cgit v1.2.3 From 5453c413bebee48a90a45dcfeda79f1557ab3f4d Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 10:40:22 +1000 Subject: Fix no html output on upload.php --- dist.zip | Bin 0 -> 173304 bytes pages/ca.swig | 2 +- pages/upload_form_nojs.swig | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 dist.zip diff --git a/dist.zip b/dist.zip new file mode 100644 index 0000000..89690f7 Binary files /dev/null and b/dist.zip differ diff --git a/pages/ca.swig b/pages/ca.swig index af16901..68c7b97 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -1,4 +1,4 @@ -{% extends "layout.swig" %} +{% extends "layoutca.swig" %} {% block body %}
diff --git a/pages/upload_form_nojs.swig b/pages/upload_form_nojs.swig index 323fc0e..73b331b 100644 --- a/pages/upload_form_nojs.swig +++ b/pages/upload_form_nojs.swig @@ -1,4 +1,4 @@ -
+
-- cgit v1.2.3 From 4b86867c0ee0ddb21d33a412ebda8cd4e65893fc Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 10:41:55 +1000 Subject: Add dist.zip to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f06235c..f1cf600 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ node_modules dist +dist.zip -- cgit v1.2.3 From a8216dfebedbb0739a423873cd86a82e4b15fdac Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 10:44:45 +1000 Subject: Remove unnecessary paragraphs --- pages/check_script.swig | 2 +- pages/check_scriptca.swig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/check_script.swig b/pages/check_script.swig index 2463580..6ebaea8 100644 --- a/pages/check_script.swig +++ b/pages/check_script.swig @@ -1,3 +1,3 @@ diff --git a/pages/check_scriptca.swig b/pages/check_scriptca.swig index b15897d..0a5f0ea 100644 --- a/pages/check_scriptca.swig +++ b/pages/check_scriptca.swig @@ -1,3 +1,3 @@ -- cgit v1.2.3 From 5ad07e817a65d058b493bbeaaf00b8d60fe13f27 Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 00:45:58 +0000 Subject: Revert ShareX / URL change commits These commits are ShareX issues, not Pomf issues. Allowing these commits to be in the source reduces maintainability. This reverts commits bbcffe8d745937677352edf25e6a250ca8fd507b, 943e7e62a8ca814d47168bcebf2cc92dbce9a45a and partially 1411bce1dc13bf6fea66b5899ba29d50d5c53bb0. --- js/pomf.js | 3 +-- static/classes/Response.class.php | 2 +- static/upload.php | 9 ++++----- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/js/pomf.js b/js/pomf.js index 29ef20b..5496284 100644 --- a/js/pomf.js +++ b/js/pomf.js @@ -122,10 +122,9 @@ $(function () { break } eachRow(res.files, function (row, file, files) { - var url = 'https://i.pantsu.cat/' + file.url var link = $('') - link.attr('href', url) + link.attr('href', file.url) .attr('target', '_BLANK') .text(file.url.replace("http://","").replace("https://","")) diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index c44230d..4f18a12 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -129,7 +129,7 @@ class Response private static function html_success($files) { foreach ($files as $file) { - $result .= "".$file['url']."
"; + $result .= "".$file['url']."
"; } return $result; diff --git a/static/upload.php b/static/upload.php index 21ae386..0504e54 100644 --- a/static/upload.php +++ b/static/upload.php @@ -93,10 +93,11 @@ function upload_file($file) $result = $q->fetch(); if ($result['count'] > 0) { unlink($file->tempfile); + return array( 'hash' => $file->get_sha1(), 'name' => $file->name, - 'url' => $result['filename'], + 'url' => POMF_URL.$result['filename'], 'size' => $file->size, ); } @@ -131,10 +132,11 @@ function upload_file($file) $q->bindValue(':exp', null, PDO::PARAM_STR); $q->bindValue(':del', sha1($file->tempfile), PDO::PARAM_STR); $q->execute(); + return array( 'hash' => $file->get_sha1(), 'name' => $file->name, - 'url' => $newname, + 'url' => POMF_URL.$newname, 'size' => $file->size, ); } else { @@ -194,7 +196,6 @@ function refiles($files) } $type = isset($_GET['output']) ? $_GET['output'] : 'json'; - $response = new Response($type); if (isset($_FILES['files'])) { @@ -211,5 +212,3 @@ if (isset($_FILES['files'])) { } else { $response->error(400, 'No input file(s)'); } - - -- cgit v1.2.3 From 25b7f821e9a572c2bded5f7a95785e5fde592c82 Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 11:36:51 +1000 Subject: Fix url generation bug --- static/classes/Response.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/classes/Response.class.php b/static/classes/Response.class.php index 4f18a12..951e39e 100755 --- a/static/classes/Response.class.php +++ b/static/classes/Response.class.php @@ -115,7 +115,7 @@ class Response private static function text_success($files) { foreach ($files as $file) { - $result .= POMF_URL.$files[0]['url']; + $result .= $file['url']."\n"; } return $result; -- cgit v1.2.3 From 82aadfd72bec82fb7a95fa2c0d1eb5b5b2021aaf Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 11:51:35 +1000 Subject: Change sharex setting url --- pages/tools.swig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/tools.swig b/pages/tools.swig index db8a51d..f82e8e4 100644 --- a/pages/tools.swig +++ b/pages/tools.swig @@ -46,7 +46,7 @@
Download
https://code.google.com/p/sharex/
Settings
-
https://p.pantsu.cat/view/raw/977674be
+
https://p.pantsu.cat/view/raw/b79ea507

Scotty

Download
-- cgit v1.2.3 From 1c8a736c7dbb9a736b67ae1d76ef324df54bbae8 Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Refactored whitespace for improved readability --- moe/panel/index.php | 119 ++++++++++++++++++++-------------------- pages/tools.swig | 153 ++++++++++++++++++++++++++++++++-------------------- 2 files changed, 154 insertions(+), 118 deletions(-) diff --git a/moe/panel/index.php b/moe/panel/index.php index 1c0cc6b..7a8bceb 100644 --- a/moe/panel/index.php +++ b/moe/panel/index.php @@ -1,64 +1,61 @@ - - Moe Panel - - - - - - - - - - - - - -
- - - - - -
- - -
-
-

- -
- - - -
-
- - - -
- - + + Moe Panel + + + + + + + + + + + + +
+ + + +
+ +
+
+

+ +

+ +
+ + + +
+
+ + +
+ diff --git a/pages/tools.swig b/pages/tools.swig index f82e8e4..2632f5f 100644 --- a/pages/tools.swig +++ b/pages/tools.swig @@ -6,83 +6,122 @@

Pomf Tools

{% include "nav.swig" %}
-

Pomfit

-
Download
-
https://github.com/pantsucat/pomfit
-
Contact
+
+

Pomfit

+
+
Download
+
https://github.com/pantsucat/pomfit
+
Contact
https://twitter.com/Senketsu_Dev
-
-

Bash Pomf Uploader

-
Download
+
+
+
+

Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/b46320a4103afda4e0ff
-
Contact
+
Contact
https://twitter.com/AnonymousLink
-
-

Simple Bash Pomf Uploader

-
Download
+
+
+
+

Simple Bash Pomf Uploader

+
+
Download
https://gist.github.com/pantsucat/da46d56e22063704604a
-
Contact
+
Contact
https://twitter.com/dev_console
-
-

limf

-
Download
-
https://github.com/lich/limf
-
Contact
-
http://lich.github.io//
-
-

1339secure

-
Download
-
https://github.com/pantsucat/1339secure
-
Contact
-
adriankoshcha@teknik.io
-
-

Python Pomf Uploader

-
Download
+
+
+
+

limf

+
+
Download
+
https://github.com/lich/limf
+
Contact
+
http://lich.github.io//
+
+
+
+

1339secure

+
+
Download
+
https://github.com/pantsucat/1339secure
+
Contact
+
adriankoshcha@teknik.io
+
+
+
+

Python Pomf Uploader

+
+
Download
https://github.com/pantsucat/POMF
-
Contact
+
Contact
https://twitter.com/FuzzyPomf
-
-

Sharex

-
Download
+
+
+
+

Sharex

+
+
Download
https://code.google.com/p/sharex/
-
Settings
+
Settings
https://p.pantsu.cat/view/raw/b79ea507
-
-

Scotty

-
Download
+
+
+
+

Scotty

+
+
Download
https://github.com/pantsucat/Scotty
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Gyazo Client (Puush like client)

-
Download
+
+
+
+

Gyazo Client (Puush like client)

+
+
Download
https://github.com/pantsucat/gyazowin
-
Contact
+
Contact
https://twitter.com/4vailable
-
-

Bash Screenshot Uploader

-
Download
+
+
+
+

Bash Screenshot Uploader

+
+
Download
https://gist.github.com/aki--aki/6258422
-
Contact
+
Contact
https://twitter.com/__akiaki
-
-

Pomf.se Windows Client Dead

-
Download
+
+
+
+

Pomf.se Windows Client Dead

+
+
Download
http://mavanmanen.nl/index.php?page=projects
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

ScrotUP Dead

-
Download
+
+
+
+

ScrotUP Dead

+
+
Download
https://github.com/mavanmanen/ScrotUP
-
Contact
+
Contact
https://twitter.com/mavanmanenDev
-
-

Perl Pomf Uploaer Dead

-
Download
+
+
+
+

Perl Pomf Uploaer Dead

+
+
Download
http://p.pomf.se/624
-
Contact
+
Contact
Kori
-
+
+
{% endblock %} -- cgit v1.2.3 From 1ce9eb2566574f651599b77271f7b8027d54d041 Mon Sep 17 00:00:00 2001 From: WubTheCaptain Date: Fri, 18 Sep 2015 03:32:38 +0000 Subject: Fix README.md outline --- README.md | 68 ++++++++++++++++++++++++++++++++++++++++++--------------------- wub.patch | 18 +++++++++++++++++ 2 files changed, 64 insertions(+), 22 deletions(-) create mode 100644 wub.patch diff --git a/README.md b/README.md index 4cf35fe..2ba1ed4 100644 --- a/README.md +++ b/README.md @@ -1,46 +1,70 @@ # Pomf -Original development environment is Nginx + PHP5.5 + MySQL, but is confirmed to work with Apache 2.4 -and newer PHP versions. Should work with any other PDO-compatible database. -# Install +## Install + For the purposes of this guide, we won't cover setting up Nginx, PHP, MySQL, -Node, or NPM. So we'll just assume you already have them all running well. +Node, or NPM. So we'll just assume you already have them all running well. + +### Compiling -## Compiling The assets are minified and combined using [Grunt](http://gruntjs.com/). -Assuming you already have Node and NPM working, compilation is easy: -``` -$ npm install -g grunt-cli -$ git clone git://github.com/pantsucat/pomf.git -$ cd pomf/ -$ npm install -$ grunt -``` -After this, the pomf site is now compressed and set up inside `dist/`. +Assuming you already have Node and NPM working, compilation is easy. Use the +following shell code: -### Apache +#### Apache If you are running Apache and want to compress your output when serving files, add to your `.htaccess` file: +======= ``` -AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +npm install -g grunt-cli +git clone git://github.com/pantsucat/pomf.git +cd pomf/ +npm install +grunt ``` -Remember to enable `deflate_module` and `filter_module` modules in your Apache configuration file. + +After this, the pomf site is now compressed and set up inside `dist/`. ## Configuring -The majority of settings are in `static/includes/settings.inc.php`. Read the + +The majority of settings are in `static/includes/settings.inc.php`. Read the comments in that file for more information. -For file size configuration, there is no server-side verification: we assume -that PHP and Nginx provide ample protection in this department. There is, +For file size configuration, there is no server-side verification: we assume +that PHP and Nginx provide ample protection in this department. There is, however, client-side configuration for max size, the `data-max-size` attribute on the file input in `pages/upload_form.swig`. -Make sure to disable PHP from being executed on the file download domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious .php file and execute it on your server. +Make sure to disable PHP from being executed on the file download +domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious +.php file and execute it on your server. + +### Apache + +If you are running Apache and want to compress your output when serving files, +add to your `.htaccess` file: + +``` +AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +``` + +Remember to enable `deflate_module` and `filter_module` modules in your Apache +configuration file. ## Todo * Clean up Moe code, a lot.. * API keys? -# Contact +## Contact I can be contacted via hostmaster@pantsu.cat. +======= +## License + +Pomf is free software, and is released under the terms of the MIT (Expat) +license. See LICENSE. + +## Contact + +The maintainer can be contacted via hostmaster@pantsu.cat. + diff --git a/wub.patch b/wub.patch new file mode 100644 index 0000000..7f0e620 --- /dev/null +++ b/wub.patch @@ -0,0 +1,18 @@ +diff --git a/README.md b/README.md +index 646bea3..213bf90 100644 +--- a/README.md ++++ b/README.md +@@ -30,11 +30,11 @@ After this, the pomf site is now compressed and set up inside `dist/`. + + ## Configuring + +-The majority of settings are in `static/includes/settings.inc.php`. Read the ++The majority of settings are in `static/includes/settings.inc.php`. Read the + comments in that file for more information. + + For file size configuration, there is no server-side verification: we assume +-that PHP and Nginx provide ample protection in this department. There is, ++that PHP and Nginx provide ample protection in this department. There is, + however, client-side configuration for max size, the `data-max-size` attribute + on the file input in `pages/upload_form.swig`. + -- cgit v1.2.3 From 8574c83cc5043ff9d5951e36d98eab85563e0503 Mon Sep 17 00:00:00 2001 From: pantsucat Date: Fri, 18 Sep 2015 18:00:33 +1000 Subject: Fix typo --- pages/ca.swig | 7 ++++--- pages/layoutca.swig | 24 ++++++++++++------------ wub.patch | 18 ------------------ 3 files changed, 16 insertions(+), 33 deletions(-) delete mode 100644 wub.patch diff --git a/pages/ca.swig b/pages/ca.swig index 68c7b97..7a51e13 100644 --- a/pages/ca.swig +++ b/pages/ca.swig @@ -2,9 +2,10 @@ {% block body %}
-
-

Roba Interior~

-
+ +
+

Ropa Interior~

+

Màxima grandària de pujada {{max_upload_size}}MiB, read the FAQ

{% include "check_scriptca.swig" %} {% include "check_fileapica.swig" %} diff --git a/pages/layoutca.swig b/pages/layoutca.swig index 92f9824..e522319 100644 --- a/pages/layoutca.swig +++ b/pages/layoutca.swig @@ -1,15 +1,15 @@ - - - - Roba Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} - - - - -
- {% block body %}What the fuck are you doing here, baka?{% endblock %} -
- + + + + Ropa Interior.cat · {% block title %}Allotjament d'arxius valent{% endblock %} + + + + +
+ {% block body %}What the fuck are you doing here, baka?{% endblock %} +
+ diff --git a/wub.patch b/wub.patch deleted file mode 100644 index 7f0e620..0000000 --- a/wub.patch +++ /dev/null @@ -1,18 +0,0 @@ -diff --git a/README.md b/README.md -index 646bea3..213bf90 100644 ---- a/README.md -+++ b/README.md -@@ -30,11 +30,11 @@ After this, the pomf site is now compressed and set up inside `dist/`. - - ## Configuring - --The majority of settings are in `static/includes/settings.inc.php`. Read the -+The majority of settings are in `static/includes/settings.inc.php`. Read the - comments in that file for more information. - - For file size configuration, there is no server-side verification: we assume --that PHP and Nginx provide ample protection in this department. There is, -+that PHP and Nginx provide ample protection in this department. There is, - however, client-side configuration for max size, the `data-max-size` attribute - on the file input in `pages/upload_form.swig`. - -- cgit v1.2.3 From 032e7d4c2ed8c50876fc3fc598559785fe88feaa Mon Sep 17 00:00:00 2001 From: pantsucat Date: Sat, 19 Sep 2015 10:06:58 +1000 Subject: Revert changes made in 274e8063d3761659243044a20ee1dc06f7414fdc --- README.md | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index d8d0f6f..56cd872 100644 --- a/README.md +++ b/README.md @@ -12,9 +12,17 @@ The assets are minified and combined using [Grunt](http://gruntjs.com/). Assuming you already have Node and NPM working, compilation is easy. Use the following shell code: -## Apache -If you are running Apache and want to compress your output when serving files, add to your `.htaccess` file: -======= +#### Apache +If you are running Apache and want to compress your output when serving files, +add to your `.htaccess` file: + +``` +AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json +``` + +Remember to enable `deflate_module` and `filter_module` modules in your Apache +configuration file. + ``` npm install -g grunt-cli git clone git://github.com/pantsucat/pomf.git @@ -39,24 +47,11 @@ Make sure to disable PHP from being executed on the file download domain/directory (e.g a.site.com), otherwise a attacker can upload a malicious .php file and execute it on your server. -### Apache - -If you are running Apache and want to compress your output when serving files, -add to your `.htaccess` file: - -``` -AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/x-javascript application/json -``` - -Remember to enable `deflate_module` and `filter_module` modules in your Apache -configuration file. - ## Todo * Clean up Moe code, a lot.. * API keys? -======= ## License Pomf is free software, and is released under the terms of the MIT (Expat) -- cgit v1.2.3 From 59f405e9f376c02f75e122fefdad6b75b5318b80 Mon Sep 17 00:00:00 2001 From: pantsucat Date: Sat, 19 Sep 2015 13:08:13 +1000 Subject: Remove dist.zip --- dist.zip | Bin 173304 -> 0 bytes 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 dist.zip diff --git a/dist.zip b/dist.zip deleted file mode 100644 index 89690f7..0000000 Binary files a/dist.zip and /dev/null differ -- cgit v1.2.3