Overly Chatty Penguins

The Ready Room => Off Topic => Topic started by: Guspaz on May 05, 2005, 11:00:22 PM

Title: I need beta testers
Post by: Guspaz on May 05, 2005, 11:00:22 PM
I've written a sort of file-upload service that is designed to be like http://www.putfile.com (http://www.putfile.com), but for text files (HTML/JS/CSS/TXT/etc).

I've even contacted the guy who runs PutFile, since we've communicated in the past via the ServerMatrix forums. The guy is interested in cross-promotion (He directs people to me as the text solution, I direct people to him as the media solution.

The problem is, before he'll start this up, I need to beta test! I need to make sure my site is relatively stable before hundreds of thousands of people start banging on it.

So please, take a look at the site (URL follows), bang on it, TRY to break it, use it, whatever! Just try to find things wrong so I can fix them :)

Here's the link: http://tekfile.net/ (http://tekfile.net/)
Title: I need beta testers
Post by: confused! on May 07, 2005, 01:01:58 PM
I ussgest checking to see if the file size is greater than 0 k.

i uploaded and empty textfile, which simply displays a google public service ad.

http://tekfile.net/file.php?id=30:d784 (http://tekfile.net/file.php?id=30:d784)

best file ever.
Title: I need beta testers
Post by: Guspaz on May 09, 2005, 02:13:13 PM
Nice catch, I thought I covered that situation :p
Title: I need beta testers
Post by: Guspaz on May 09, 2005, 02:41:54 PM
Hmm, I did...

It seems your file was not quite empty, but had a newline in it.

I'll look into filtering out stuff that only has whitespace.
Title: I need beta testers
Post by: confused! on May 09, 2005, 02:47:23 PM
ergh. foiled by vi.

i thought i told it not to save changes. oh well. white space culling isn't a bad idea.
Title: I need beta testers
Post by: Guspaz on May 09, 2005, 03:08:49 PM
Done, it now checks if the file is only whitespace and treats that as an empty file.

Find more bugs please! :)
Title: I need beta testers
Post by: confused! on May 09, 2005, 09:39:00 PM
you dont seem to be closing files which have been uploaded..
 after uploading a file i cannot rename it/ delete etc.



Mozilla 1.7.5
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217
Title: I need beta testers
Post by: Guspaz on May 09, 2005, 10:48:51 PM
That's beyond my control, I use the standard HTML forms for uploading. In other words, it's all the browser handling the upload.

I just specify a file upload form and the browser does the rest.

It actually looks something like this (With other HTML stripped out):

<form name='formText' enctype='multipart/form-data' method='post' action='index.php'>
<input type="hidden" name="MAX_FILE_SIZE" value="262144">
<input type='file' name='textfile' size=30>
<input type='submit' name='SubmitText' value='Upload File'>

And yes, I did forget to close the form tag. Confused, you have a nack for making me discover OTHER bugs than what you report :p
Title: I need beta testers
Post by: confused! on May 10, 2005, 12:47:41 AM
to make it more fun, i can upload condumps, im not sure why.

i get the claim that in fact the document is not of type text.

edit: it seems to stem from teh following lines :
Code: [Select]
Confused!-TSA has joined the game
Confused!-TSA has joined the game
RisingSun: Re.Re.Re.ReS WHORE
Confused!-TSA has joined the Kharaa
Type 'amx_help' in te console to see available commandsvaunted killed |GP|PsiRedEye22 with shotgun
Time Left: 2:57 min. Next Map: co_coreCyberPitz^Zephiris killed Tachyon with bitegun
vaunted killed CyberPitz^Zephiris with shotgun
`: FADE
Title: I need beta testers
Post by: Guspaz on May 10, 2005, 03:17:25 PM
Quote
to make it more fun, i can upload condumps, im not sure why.

i get the claim that in fact the document is not of type text.

edit: it seems to stem from teh following lines :
Code: [Select]
Confused!-TSA has joined the game
Confused!-TSA has joined the game
RisingSun: Re.Re.Re.ReS WHORE
Confused!-TSA has joined the Kharaa
Type 'amx_help' in te console to see available commandsvaunted killed |GP|PsiRedEye22 with shotgun
Time Left: 2:57 min. Next Map: co_coreCyberPitz^Zephiris killed Tachyon with bitegun
vaunted killed CyberPitz^Zephiris with shotgun
`: FADE
[snapback]48246[/snapback]

What is the file extension? TekFile checks both the file extention, and the mime type (as reported by the "file" utility). It only accepts htm, html, css, js, and txt.
Title: I need beta testers
Post by: confused! on May 10, 2005, 05:40:02 PM
file extension is .txt

the character that doesnt display seems to be at fault;  if i remove them it seems to work fine.
Title: I need beta testers
Post by: Guspaz on May 10, 2005, 06:24:40 PM
Can you tar/zip/whatever it up and email it to me? (guspaz@gmail.com)

I'll need to run it through the pipeline and see what TekFile is coming up with internally. I might have to add an exception like support another MIME type, or stripping out that particular character.
Title: I need beta testers
Post by: devicenull on May 10, 2005, 07:17:58 PM
Very good, you checked for file size after it was uploaded :)
Title: I need beta testers
Post by: confused! on May 10, 2005, 08:02:43 PM
guspaz just copy the first two lines of the stuff i wrote above and paste it into a fresh text document.

if you need a sample condump: http://www.confusionville.net/condump015.txt (http://www.confusionville.net/condump015.txt)

try that
Title: I need beta testers
Post by: Guspaz on May 10, 2005, 11:17:19 PM
Quote
Very good, you checked for file size after it was uploaded :)
[snapback]48287[/snapback]

Yep, the HTML limit is only the first line of defence ;)
Title: I need beta testers
Post by: Guspaz on May 10, 2005, 11:18:20 PM
Hmm, it is reported as an application/octet-stream...

Looks like my best bet is to filter out the chars in question.
Title: I need beta testers
Post by: Guspaz on May 10, 2005, 11:41:10 PM
They are ascii 1 and 2, which are "start of heading" and "start of text" respectively. Since they're non-printable chars, there is absolutely no problem filtering them out.

After filtering those two out, the file seems to upload fine:

http://tekfile.net/file.php?id=45:708a (http://tekfile.net/file.php?id=45:708a)

I could filter out all non-printable chars, but I'm wary of the performance implications of doing that on stings up to 256KB in size. Also I wonder how exactly the "file" command determines what format the files are. If I filter out all non-printables, might it think everything is text?

Let me know if you have trouble with any other files.