Gossamer Forum
Home : Products : Links 2.0 : Discussions :

spaces in query - problem

Quote Reply
spaces in query - problem
Hello,

I think, I found a problem with Links 2.0.
If you search for something like 'soccer search' (one space between the two words) in the resource center, for example, all works fine. 20 KB would be load from the server - that was displayed in my browser-status-bar (netscape).
If you search for 'soccer search' (3 spaces in there in the query) 102 KB would be load from the server.
Always the same results would be shown.

Has anybody the same effect?

Is that dangerous for the security? Maybe, if you entered 10 spaces the between the words, the loaded file would be very big, I think.

Has anybody solve this?

Del.

Quote Reply
Re: spaces in query - problem In reply to
From a CPU/Memory standpoint, it does have an adverse effect...I tested this in my site...and what I found is that if I use the following keywords:

environmental medical

with 9 spaces, I get the following Benchmark results:

Code:

33 wallclock secs (26.72 usr + 5.45 sys = 32.17 CPU)


and the following top report:
(typing in top at the telnet command prompt)

Code:

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
1258 nobody 68 0 21M 21M run/0 0:30 94.60% 75.54% search.cgi


With only one space, I get the following Benchmark results:

Code:

3 wallclock secs ( 2.00 usr + 0.03 sys = 2.03 CPU)


and the following top report:

Code:

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
1577 nobody 2 0 5496K 6328K sleep 0:03 67.92% 15.04% search.cgi


Thanks for pointing this out...I think what needs to be done is use "whitespace" codes for the $in{'query'} variable in the search.cgi file to be single spaces rather than multiple spaces.

Regards,

Eliot Lee
Quote Reply
Re: spaces in query - problem In reply to
Has anybody figured out that? Or do you think thats not a problem? I think - it is.

Del.

Quote Reply
Re: spaces in query - problem In reply to
It definitely is a problem...I have not had a chance to test any of the bug fixes that I think may work.

Regards,

Eliot Lee
Quote Reply
Re: spaces in query - problem In reply to
Me too.
But now I must sleep. I hope I could figure it out next week. ;-)

Del.