Could somebody make the modification and put it up here for me? Please!
Sep 16, 2001, 8:35 AM
Veteran (17240 posts)
Sep 16, 2001, 8:35 AM
Post #28 of 54
Views: 8155
The problem is with the HTTP_REFERER variable config in the birdcast,cgi script...you have not specified your domain, thus the script cannot run,
Got it?
========================================
Buh Bye!
Cheers,
Me
Got it?
========================================
Buh Bye!
Cheers,
Me
Last edited by:
AnthroRules: Sep 16, 2001, 8:36 AM
Sep 17, 2001, 7:36 AM
Veteran (17240 posts)
Sep 17, 2001, 7:36 AM
Post #31 of 54
Views: 8284
No need to get snotty, Tom!
You have IMPROPERLY DEFINED the domains in the that ARRAY (if you
had compared the configurations you have in the @db_referer in
the links.cfg file, you would've seen your ERROR)...
The array needs to be configured as follows:
@okaydomains = ('tomj.com','www.tomj.com');
Got it??
Next time, a little more respect will go a long way!
========================================
Buh Bye!
Cheers,
Me
You have IMPROPERLY DEFINED the domains in the that ARRAY (if you
had compared the configurations you have in the @db_referer in
the links.cfg file, you would've seen your ERROR)...
The array needs to be configured as follows:
Code:
@okaydomains = ('tomj.com','www.tomj.com');
Got it??
Next time, a little more respect will go a long way!
========================================
Buh Bye!
Cheers,
Me
Sep 17, 2001, 8:27 AM
User (90 posts)
Sep 17, 2001, 8:27 AM
Post #37 of 54
Views: 8241
ok, here is the code...
i am sure, that now you want to see again my domain information... :
i tried two different, but it gives the same error
@okaydomains = ('http://tomj.net','www.tomj.net');
@okaydomains = ('tomj.net','www.tomj.net');
the last one is by AnthroRules
sub valid_page
{
if (@okaydomains == 0) {return;}
$DOMAIN_OK=0;
$RF=$ENV{'HTTP_REFERER'};
$RF=~tr/A-Z/a-z/;
foreach $ts (@okaydomains)
{
if ($RF =~ /$ts/)
{ $DOMAIN_OK=1; }
}
if ( $DOMAIN_OK == 0)
{ print "Content-type: text/html\n\n Sorry, cant run it from here....";
exit;
}
}
i am sure, that now you want to see again my domain information... :
i tried two different, but it gives the same error
@okaydomains = ('http://tomj.net','www.tomj.net');
@okaydomains = ('tomj.net','www.tomj.net');
the last one is by AnthroRules
sub valid_page
{
if (@okaydomains == 0) {return;}
$DOMAIN_OK=0;
$RF=$ENV{'HTTP_REFERER'};
$RF=~tr/A-Z/a-z/;
foreach $ts (@okaydomains)
{
if ($RF =~ /$ts/)
{ $DOMAIN_OK=1; }
}
if ( $DOMAIN_OK == 0)
{ print "Content-type: text/html\n\n Sorry, cant run it from here....";
exit;
}
}
Sep 17, 2001, 8:33 AM
Veteran (19537 posts)
Sep 17, 2001, 8:33 AM
Post #38 of 54
Views: 8075
Yikes.....
Try something like:
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
$ENV{HTTP_REFERER} =~ /^$_/i and $ok = 1;
} else {
$ok = 0;
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}
@okaydomain = ('http://www.mydomain.com/cgi-bin/birdcast.cgi','http://mydomain.com/cgi-bin/birdcast.cgi');
Try something like:
Code:
sub valid_page { print "Content-type: text/html\n\n";
foreach (@okaydomains) {
$ENV{HTTP_REFERER} =~ /^$_/i and $ok = 1;
} else {
$ok = 0;
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}
@okaydomain = ('http://www.mydomain.com/cgi-bin/birdcast.cgi','http://mydomain.com/cgi-bin/birdcast.cgi');
Last edited by:
PaulWilson: Sep 17, 2001, 8:35 AM
Sep 17, 2001, 10:32 AM
Novice (25 posts)
Sep 17, 2001, 10:32 AM
Post #41 of 54
Views: 8382
You know what I did too fix that problem???
@okaydomains=("http://tomj.com", "http://www.tomj.com");
I put a big ol fat ##### in front of it.
Cut it right out, and it works fine. Does anyone actually think people are going to cut into the script and use it for their own? Hmm....maybe in rare cases.
If so, then figure it out. But to test the script, cut that sucker out, till you get it working.
It's not like it is a security threat......is it? lol
dunno
God Bless our Great Nation
God Bless every Family involved in the Tragedy
God Bless all Rescue Efforts
God Bless Peace on Earth
@okaydomains=("http://tomj.com", "http://www.tomj.com");
I put a big ol fat ##### in front of it.
Cut it right out, and it works fine. Does anyone actually think people are going to cut into the script and use it for their own? Hmm....maybe in rare cases.
If so, then figure it out. But to test the script, cut that sucker out, till you get it working.
It's not like it is a security threat......is it? lol
dunno
God Bless our Great Nation
God Bless every Family involved in the Tragedy
God Bless all Rescue Efforts
God Bless Peace on Earth
Sep 17, 2001, 10:43 AM
Veteran (19537 posts)
Sep 17, 2001, 10:43 AM
Post #43 of 54
Views: 8187
Sorry I missed a bracket:
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}
Code:
sub valid_page { print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here....";
exit;
}
}
Last edited by:
PaulWilson: Sep 17, 2001, 10:44 AM
Sep 17, 2001, 11:11 AM
Veteran (19537 posts)
Sep 17, 2001, 11:11 AM
Post #45 of 54
Views: 8084
Ok try a bit of debugging........
print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ref = $_;
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here...Current referer : $ENV{HTTP_REFERER}";
exit;
}
}
Code:
sub valid_page { print "Content-type: text/html\n\n";
foreach (@okaydomains) {
if ($ENV{HTTP_REFERER} =~ /^$_/i) {
$ok = 1;
} else {
$ref = $_;
$ok = 0;
}
}
if ($ok < 1) {
print "Sorry, cant run it from here...Current referer : $ENV{HTTP_REFERER}";
exit;
}
}