'str(i)str(...)' could be replaced with 'str(i)pos(...)'.

(cherry picked from commit b4d079f)
This commit is contained in:
Yuriy Pikhtarev 2017-05-05 01:01:48 +03:00 committed by Vasily Komrakov
commit 8e5338e5d3
No known key found for this signature in database
GPG key ID: 558236680C20A69A
8 changed files with 14 additions and 14 deletions

View file

@ -1741,7 +1741,7 @@ function redirect($url)
trigger_error("Headers already sent in $filename($linenum)", E_USER_ERROR);
}
if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r") || strstr(urldecode($url), ';url')) {
if (false !== strpos(urldecode($url), "\n") || false !== strpos(urldecode($url), "\r") || false !== strpos(urldecode($url), ';url')) {
bb_die('Tried to redirect to potentially insecure url');
}