How to replace forbiden words in lowercase or uppercase

Discussions of secure PHP coding. Security in software is important, so don't be afraid to ask. And when answering: be anal. Nitpick. No security vulnerability is too small.

Moderator: General Moderators

User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

Jcart wrote:
Mordred wrote:You need to repeat the filtering in a loop untill no more changes are made. Otherwise consider filtering the word "delete" from the string
"dedeletelete" (highlighted for clarity)
The words aren't removed, they are replaced with smurf.
In the OP example they are indeed removed.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

Mordred wrote:
Jcart wrote:
Mordred wrote:You need to repeat the filtering in a loop untill no more changes are made. Otherwise consider filtering the word "delete" from the string
"dedeletelete" (highlighted for clarity)
The words aren't removed, they are replaced with smurf.
In the OP example they are indeed removed.
That's a smurfing shame :-( Smurf the OP!!!! (whatever the smurf that is...)
User avatar
Mordred
DevNet Resident
Posts: 1579
Joined: Sun Sep 03, 2006 5:19 am
Location: Sofia, Bulgaria

Post by Mordred »

Smurf the OP? That's not very polite, and besides most routers nowadays are immune to it. ;) Image
Post Reply