nokonoko / Pomf

Simple file uploading and sharing, source for the now shut down site Pomf.se
MIT License
463 stars 98 forks source link

Can't upload .user.js files/userscripts #23

Closed ghost closed 9 years ago

ghost commented 9 years ago

Example: https://github.com/ccd0/4chan-x/raw/master/builds/4chan-X-beta.user.js becomes https://a.pomf.se/znivud.js

// ==UserScript== // @name 4chan X beta // @version 1.9.13.4 // @minGMVer 1.14 // @minFFVer 26 // @namespace 4chan-X // @description Cross-browser userscript for maximum lurking on 4chan. // @license MIT; https://github.com/ccd0/4chan-x/blob/master/LICENSE // @match ://boards.4chan.org/ // @match ://sys.4chan.org/ // @match ://a.4cdn.org/ // @match ://i.4cdn.org/ // @grant GM_getValue // @grant GM_setValue // @grant GM_deleteValue // @grant GM_listValues // @grant GM_openInTab // @grant GM_xmlhttpRequest // @run-at document-start // @updateURL https://ccd0.github.io/4chan-x/builds/4chan-X-beta.meta.js // @downloadURL https://ccd0.github.io/4chan-x/builds/4chan-X-beta.user.js // @icon data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAACVBMVEUAAGcAAABmzDNZt9VtAAAAAXRSTlMAQObYZgAAAF5JREFUeNrtkTESABAQxPD/R6tsE2dUGYUtFJvLDKf93KevHJAjpBorAQWSBIKqFASC4G0pCAkm4GfaEvgYXl0T6HBaE97f0vmnfYHbZOMLZCx9ISdKWwjOWZSC8GYm4SUGwfYgqI4AAAAASUVORK5CYII= // ==/UserScript==

gets removed/stripped, making the userscript uninstallable

nokonoko commented 9 years ago

I have removed the file you linked, now try uploading it again, it should work.

nokonoko commented 9 years ago

Now about the code being stripped is Cloudflares fault, try accessing the file via http://f.oxipry.se/tjcxzu.user.js (f.oxipry.se/FILENAME goes around Cloudflare) and it works without any problems. I will look into this.

ghost commented 9 years ago

http://f.oxipry.se/tjcxzu.user.js works Uploading .user.js files works now too, but it seems like cloudflare is still stripping //comments

nokonoko commented 9 years ago

Cloudflare should no longer be stripping or messing with the code anymore.