-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed low risk XSS issue with user account address edit. Thanks to @r…
- Loading branch information
1 parent
3319a61
commit 303fa88
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
303fa88There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesallsup
is_intwill always return false as$this->request->post['zone_id']is a string.is_numericcould be used instead.There are also a few other places where the
zone_idis output without validation. See links below for the places in 1.5.x.opencart-ce/opencart-ce@7cb8a38
opencart-ce/opencart-ce@dbb7d13
opencart-ce/opencart-ce@9ae8661
The test could also maybe written as below without the test for an empty string, for a small optimisation.
303fa88There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why don't you use
intvalfunction?http://php.net/manual/en/function.intval.php
303fa88There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ADDCreative - New commit based on feedback 33642ba