UBB.Dev
Posted By: Em8 A registering script - 10/23/2000 2:52 AM
I dunno what it would be used for but
Code
code:

I'll install it in a sec. and see if it works.

------------------
You may use all my images posted unless I say otherwise My place!

This message has been edited by Em8 on October 24, 2000 at 07:15 PM
Posted By: Mark Badolato Re: A registering script - 10/23/2000 4:09 AM
I can tell you right now it won't work.

param() is a CGI.pm function and thusly (since the OO method is being used) all references to param() need to be written as $q->param(). I see at least 6 instances where it is wrong.

Not to mention that:

open("USER",param(user).'.cgi') || die ("Can't Regester you: $! ");

is:
1) a security hole the size of Texas.
2) written incorrectly anyway. USER should not be in quotes, and it is preferable to use 'or' instead of '||' in this situation.

Plus, I see calls to subroutines called lock and unlock (lock being called AFTER information is read in from the file, which is pointless..), yet neither of them appear in the file, nor are any other files require()ed in.

Not recommended that you or anyone else put this on a live server.

--mark

This message has been edited by Mark Badolato on October 22, 2000 at 09:10 PM
Posted By: Em8 Re: A registering script - 10/24/2000 12:05 AM
****! I suck! I feel stupid

------------------
You may use all my images posted unless I say otherwise My place! laugh
Posted By: Mark Badolato Re: A registering script - 10/24/2000 1:32 AM
OOps was that your script?? Sorry, I wouldn't have been quite so harsh.. i thought you meant you found it somewhere because you said you were about to go install it.
Posted By: Melchus Re: A registering script - 10/24/2000 3:23 AM
Just wondering: Why &lock/&unlock and not flock?
Posted By: zanardi Re: A registering script - 10/24/2000 4:35 PM
Well, I think he used the Unlock and Lock because he probably saw it on the UBB. Besides Flock doesn't work on all systems.
Posted By: Mark Badolato Re: A registering script - 10/24/2000 5:30 PM
Flock works on systems that matter. It works on Unix systems, and NT systems. It does not work on Win9x systems, and that doesn't count, as far as CGI applications are concerned.

Anyone hosting apps such as UBB on a Win9x box has bigger problems to worry about than flock.

Sometimes external locking routines are necessary, but they are not preferred due to race conditions. My personal feeling is that flock should always be used, and if that makes it incompatible on a win9x system, too bad.

It's easy enough to code it so that it won't generate an error under win9x, but it just means that win9x won't get locking. That also means that it shouldn't be used in production on a win9x system, but again, my feeling is that win9x systems shouldn't be used in the first place (for production)

--mark
Posted By: Em8 Re: A registering script - 10/25/2000 12:27 AM
UBB: ubb_library2.pl
YaBB: Subs.pl

Found sub lock/unlock but I'm matching the $ signs.

------------------
You may use all my images posted unless I say otherwise My place! laugh
Posted By: Em8 Re: A registering script - 10/25/2000 2:20 AM
Quote
quote:
Well it did stink. *lol* its stupid. Thats what I get for doing somthing at 2 in the morning.



------------------
You may use all my images posted unless I say otherwise My place! laugh
Posted By: Melchus Re: A registering script - 10/25/2000 4:05 AM
Hmm... I am suprised that YaBB use also a &lock/&unlock routine eek.

Em8:
Install a webserver with Perl on your local machine and get a good Perl book (O'Reilly [Linked Image]). Its not to difficult to learn Perl.

Christian
© UBB.Developers