Gossamer Forum
Home : Products : Links 2.0 : Discussions :

add.cgi bug

Quote Reply
add.cgi bug
The category does not get filled in by add.cgi when people omit or add the www. in the URL.

HERE IS A FIX FOR MOST OF THE PROBLEM.

if ($db_single_category) {
my %is_valid = map { $_ => 1 } &category_list;
$ENV{'HTTP_REFERER'} =~ s,/[^/]+\.[^/]+$,,;
## ADDED
$ENV{'HTTP_REFERER'} =~ s,http://www\.,http://,;
$build_root_url =~ s,http://www\.,http://,;
## CHANGED
$ENV{'HTTP_REFERER'} =~ m,$build_root_url/(.+?)/?$,i;
$is_valid{$1} ? &site_html_add_form ($1) : &site_html_add_form ();
}

HOW TO SEE IT HAPPEN
Go to any category click on add link.
If the category is listed, then go back
and remove the www or add the www or somehow change the domain name or IP address to an equivalent. Then go back and add.cgi will not have the information.
Quote Reply
Re: add.cgi bug In reply to
This is directed to me isn't it?
I tried it and the problem still occurs. I am thinking maybe it has something to do with the loopy multiple category mod I installed.

Original Message I wrote:
Well, here is the scenerio.
Links 2.0 was working fine and now it doesn't. Now that would ordinarily be okay I will just fix it. But as most stories tend to be more convoluted this one is no exception.

Now my add.cgi stopped working properly. Again this would not be a problem but it is as it works fine for some people and not for others. Some people can submit data and others dont even get an error message but it doesnt submit anything at all for validation.
Now before you all go on about uploading it blah blah ...it was uploaded ascii. also the rest of the scripts seem to be working fine for everyone. It isn't a browser compatability problem as it has worked and not worked on both platforms. also my links.cfg has its @db_referers = ();
SO YOUR GUESS NOW.....
Help me if you can my script is down!
and I do appreciate your advice being sound!
Help me get my Links back off the ground!
Oh Please please please Help Me!

------------------
SkaHoo Moderator

SkaHoo International
Ska Search Engine



[This message has been edited by skahoo (edited August 21, 1999).]
Quote Reply
Re: add.cgi bug In reply to
http://www.gossamer-threads.com/scripts/forum/resources/Forum3/HTML/002848.html


This is the answer. It was a html problem.
The form tags were in a different table to the actual form elements.

Thanks to all who helped.

Skahoo