PDA

View Full Version : file upload scripting


Del
11-16-1998, 08:06 AM
Why is it that when I submit a form with enctype="multipart/formdata" (or whatever it is, I can't remember it off the top of my head) that the durn thing doesn't want to parse the hidden fields (which store the username n password)? When I submit the form, the darn script just returns the "You didn't enter a username" error I set it up to use when (surprise) the user doesn't enter a username.

(This is about that file manager script. I have it store the username and password in hidden fields on every page the script generates, and it checks them against the password file every time the script is called. When done the password will be encrypted in the hidden field tho, so's noone can view source and nab a pword)

That's my ramble for the day.

Del

Terra
11-16-1998, 02:41 PM
For somthing like that, write a supplemental test script to feed the form to, that will in turn print out all the values submitted, via either a method GET or POST...

Sort of like dumping out your $ENV{} while debugging...

I have found the CGI.pm library to be of substantial use to me, though the learning curve for it can be high...

You are at a stage of 'process of elimination'... Which is broke, the form or the cgi script...


On the passwords -- I would suggest using the MD5.pm module, very secure hash methods...

That's my tips for the day... http://www.aota.net/ubb//smile.gif

Hope this helps in some way...

--
Terra

Del
11-16-1998, 03:11 PM
I've been sittin here musing over picking thru the existing script and rewriting (parts of) it to use CGI.pm instead. That way the blinkin upload thinger should work right. I've known for a little while that I need to learn cgi.pm, but never really found the attitude to do so. Think that attitude will come real soon tho.

I just took a quick peak at the md5 manpage. Will read more thoroughly soon. It does leave me with one question right away tho. Why is my telnet window smaller than the page shown? When I hit the [spacebar] it shows the next page alright, just minus the top few lines... Currently I'm just using the built in windows telnet thing (that's my problem I'm sure). What freeware telnet client would you recommend?

Del

(grrrrr... I hit 'reply' and then stupid GTE booted me. 18 more hours on online-ing and then we're done with GTE and get to find a new ISP!!! yyaaaayyyyyy!!!)

Terra
11-16-1998, 03:41 PM
Eeegads... Windows (brain dead) Telnet?

you must be masochistic...

goto http://www.vandyke.com and get either CRT or SecureCRT... I use SecureCRT faithfully... Both of these are simply the _best_ telnet programs available... IMHO

If you are going to be developing or doing a lot of CGI debugging, you *need* a quality telnet program...

This is one application worth -owning- http://www.aota.net/ubb//wink.gif

Del
11-16-1998, 04:00 PM
No, not masochistic, just broke (again) *s* Wife won't let me buy any new software til we've paid of the new domain names (and she'll probly try to weasel yet another beanie baby outta the deal too...) http://www.aota.net/ubb//frown.gif

Del