UGN Security
Posted By: Gollum links go to server - 04/15/04 07:05 AM
ok, so inside a perl script of mine, i take user input. this COULD be a link. now my code does a few of find/replace iterations to replace quotes with &quot however, i don't wanna do this in a link (right?) so i've decided to reaplce them with single quotes....for nwo anyway. basically my problem is this. when i click on a link on one of the pages. say "www.slashdot.org" it'd do like "http://www.mysite.com/'www.slashdot.org'" and of course come up with a page doesn't exist error. i'm still doing some testing. and it seems that sometimes when i type th http in front it works...but then sometimes it doesn't. but get this. when i view source. the url is always what i type in. so i think it must be apache that's doing it. but i don't remember it doing it before. so could this also be related to perl? so yeah...for some reason, 90% of the time, it tries finding everything locally. now it doens't happen all the time, i just need to figure out what i'm doing differently. but has anyone else run into this problem?
btw, while i'm posting, thanks for the reply on the hash of arrays, helped out quite a bit in the end.//
Posted By: Brett Re: links go to server - 04/19/04 08:41 PM
I think i know what your talking about here.
Code
$url = 'http://' . $url if(substr($url, 0, 7) ne 'http://');
?
© UGN Security Forum