You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
w2PgetParam()'s character filter never matches #403
The pattern isn't a character class, so it only matches that exact sequence of characters and practically never removes anything. The array branch has the same problem. In practice w2PgetParam() only runs strip_tags() on strings and does nothing to array values.
Code that relies on it to make a value safe for SQL or HTML is unprotected. It also can't be "fixed" by turning it into a character class without breaking legitimate input (names with apostrophes, URLs with colons).
Fix:
Remove the misleading preg_replace() calls, or document that w2PgetParam() only strips tags.
Audit callers that put w2PgetParam() results into SQL or HTML without a cast or escaping, and cast ((int)), quote ($q->quote()) or escape (htmlspecialchars()) them at the point of use.
Activity
w2PgetParam(): drop the filter that never matched; fix callers that r…