J
John J. Trammell
Here's what it looks like now, why isn't it printing it to the files...?
Thanks,
-Robin
#!/usr/bin/perl
#!/usr/bin/perl -T
use strict;
use warnings;
Here's what it looks like now, why isn't it printing it to the files...?
Thanks,
-Robin
#!/usr/bin/perl
Robin said:Here's what it looks like now,
#!/usr/bin/perl
&data_cgivars;
Robin said:Here's what it looks like now,
Uri Guttman said:R> Got it working...thanks for all your great help...
got what working? your code had multiple bugs, security loopholes,
redundant cruft (CGI.pm AND lib.cgi???? do you wear a belt and
suspenders?), bad perl code, perl4 type calls, etc.
would presumably be taken care of by that mysterious "lib.cgi" the
program require()s. Is there a reason you're not using CGI.pm for this?
: Any help would be great.
You have not adequately described the problem. Posting the entire
program accomplished nothing.
No "use warnings;".
No "use strict;".
No checking open() calls for success.
No file locking.
No taint checking.
Ask Perl for help before asking people.
[snip code]
: open (POSTFILE, ">>BBSFILES/$FORM{'name'}.post");
[snip code]
Opening a file whose name includes a user-specified substring is a very
bad idea.
I started reading the perldocs actually, not to defend myself or anything.you wrote it. you don't read perldocs (like the one that covers
security). you don't listen here.
that means security holes.
uri
Gunnar said:Aren't those variables supposed to be set before the CGI object is created?
Robin said:what I'm trying to do is get this bbs.cgi to work better. So when someone
types in spaces as their name it will work to reply to them and on the
"Reply to..." screen will actually stop showing the %A or whatever it is,
what is that btw? Any help would be great.
That should not make any difference since this is class data.
You can try this out at http://www.unur.com/cgi-bin/ctest_after.
Uri Guttman said:R> Got it working...thanks for all your great help...
got what working? your code had multiple bugs, security loopholes,
redundant cruft (CGI.pm AND lib.cgi???? do you wear a belt and
suspenders?), bad perl code, perl4 type calls, etc.
no one here will use this and given the many (mostly crappy) free bbs
things out there, this will only join that pile and rot away.
A. Sinan Unur said:But sir, CGI.pm does the actual reading of the data when the first CGI
object is created.
Consider the following script:
#! /usr/bin/perl -T
use warnings;
use strict;
use CGI;
my $q = CGI->new();
$CGI:OST_MAX = 1;
$CGI:ISABLE_UPLOADS = 1;
unless($q->param('submit')) {
show_form($q);
} else {
process_form($q);
}
sub show_form {
my ($q) = @_;
print $q->header();
print <<HTML;
<html>
<body>
<form method="post">
<input type="hidden" name="hidden" value="0123456789">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
HTML
}
sub process_form {
my ($q) = @_;
print $q->header();
print <<HTML;
<html>
<body>
<p>Hi</p>
</body>
</html>
HTML
}
__END__
....
....
So, what am I supposed see running this?
Definitely not the submit button and the 'Hi'.
If you set the variables after creating the CGI object (as above), that is
exactly what you are going to see. Whereas if you set the variables before
creating the CGI object, you will see the submit button again.
This will hopefully be my last communication with you on this topic.
A. Sinan Unur said:If you set the variables after creating the CGI object (as above),
that is exactly what you are going to see. Whereas if you set the
variables before creating the CGI object, you will see the submit
button again.
Sorry, did not mean to annoy you. I just did not get your point of
restricting the POST size to 1 byte at a first glance.
[...]This will hopefully be my last communication with you on this topic.
Probably next time I should post under the pseudonym 'Robin' to
receive a less harsh tone from your side
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.