Click here to get back home

PHP sanitization burps?

 HomeNewsGroups | Search

comp.lang.php - PHP programming language discussions 

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
PHP sanitization burps? Twayne 11-06-2008
Posted by Curtis on November 8, 2008, 1:54 am
Please log in for more thread options
On Fri, 07 Nov 2008 16:06:58 GMT, nobody@devnull.spamcop.net wrote:
show/hide quoted text
[snip]

So you're using filter_var() for form data in your actual script? If
so, you ought to be using filter_input(). Actually, I'm not sure of
any benefit using filter_var() with FILTER_SANITIZE_SPECIAL_CHARS
over htmlspecialchars() (maybe the options); this is just a guess,
though.

This still doesn't explain your problem, and I have yet to reproduce
the behavior (PHP 5.2.6, Win32, Apache 2 module). Have you searched
the PHP bug tracker?

Here's a php.net example using filter_input:
show/hide quoted text
FILTER_SANITIZE_SPECIAL_CHARS);
show/hide quoted text

--
Curtis
$email = str_replace('sig.invalid', 'gmail.com', $from);

Posted by Twayne on November 8, 2008, 1:00 pm
Please log in for more thread options
Curtis said:
show/hide quoted text

PHP 5.2.2(Apache/2.2.8 (Win32) here.

show/hide quoted text

DAMN! It *seems* to be working now. And I have abolutely NO techincal
Idea why! The overnight AV scan came up with an unidentified "high"
rated virus overnight, claiming it couldn't completely clean it or
quarantine it and a manual link to follow for manual cleaning/reporting.
I followed the instructions and when I came back to look at that alert
again, it was gone! If that was on purpose, it's kind of rude not to
let me know why it closed. Anyway, I'm rerunning the scans on that
machine now but it's going to take a long time because I let it include
the 2 500 Gig external drives in addition to the system drives which
total around 600 Gig.

Silly question, assuming the problem isn't actually gone: I'm running
PHP 5.2.2 because that's what's on my remote server; seemed like the
route to the least problems. I do have PHP 5.2.6 though, and could run
it instead (on my local Apache server, that is).
Would there be any benifit in temporarily running 5.2.6? I don't
think so, but since you indicated it's what you're using I thought I'd
ask.

I've been meaning to learn filter_input() as a matter of fact, having
only really discovered it since this problem arose. Thanks much for
the code stub; it will help a lot in getting started.
Another question: Everything I've ever read, and several others on
the groups, have warned me away from _GETs. I recall there is a _POST
also from my readings. In this context, I can't imagine a downside to
show/hide quoted text
Does it matter whether GET or POST is used in this context?

Many thanks Curtis, I appreciate your efforts. I'll be back one way or
another.

Regards,

Twayne



Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Driving a better car - Fuelzilla.com

Cabling site for homeowners and pros alike - Cabling-Design.com

Friends:

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap
Privacy Policy