Click here to get back home

Session ID / login security script

 HomeNewsGroups | Search | About
 comp.lang.perl.misc    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Session ID / login security script B. Ghassemlou 01-12-2005
Get Chitika Premium
Posted by B. Ghassemlou on January 12, 2005, 9:35 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by Matt Garrish on January 12, 2005, 11:06 pm
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Posted by B. Ghas on January 13, 2005, 1:04 am
Please log in for more thread options
>>
>> [snip]
>>
>> > if I print "$1\n",
>> > the file prints just fine. But, if I do something like print "$1 after
>> > \n", the whole output is messed up. If I print "before $1\n", nothing
>> > prints at all. If I print "before $1 after\n", only after prints.
>>
>> not really sure, but could be a rogue "\r" in $1,


> There
> is a rogue carriage return (0xd) in the string

> Is there something I can do to deal with this
> situation?


Repair the corrupted file:

perl -p -i -e 'tr/\r//d' bad_file


--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas

Similar ThreadsPosted
setting of session values from a script for the same session in which it is running May 23, 2005, 12:35 am
Simple security script baffling... April 22, 2005, 7:46 pm
Having Trouble with a CGI login script January 5, 2005, 12:06 pm
Having Trouble with a CGI script login January 6, 2005, 1:15 pm
Perl CGI script using Win::ODBC module - failed login on December 27, 2004, 3:28 pm
Redirecting to my own login page instead of Apache Login March 24, 2008, 12:22 am
Apache::Session simple test script July 15, 2005, 9:29 pm
new CGI::Session creates a new session every visit. GRRR!!! March 15, 2007, 6:43 pm
CGI::Session How can a session be not expired and at the same time empty? June 14, 2007, 3:56 pm
CGI:Session porting to Apache:Session June 25, 2005, 10:31 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap