Skip to content

Commit

Permalink
Security fixes
Browse files Browse the repository at this point in the history
Signed-off-by: deviance <meangczac.chan@gmail.com>
  • Loading branch information
FrederickChan committed Aug 19, 2022
1 parent 2f9a201 commit 57c96d4
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions includes/classes/PHPFusion/UserFieldsInput.php
Expand Up @@ -666,15 +666,12 @@ public function saveUpdate() {

// hidden input tamper check - user_hash must not be changed.
// id request spoofing request
$a_check = ($this->userData["user_password"] != sanitizer("user_hash", "", "user_hash"));
$b_check = ($this->userData['user_id'] != fusion_get_userdata('user_id'));
// for admin with sufficient rights, skip all these formats
if (iADMIN && checkrights("M")) {
$a_check = FALSE;
$b_check = FALSE;
}
if ($a_check or $b_check) {
fusion_stop();
if (!(iADMIN && checkrights('M')) ||
($this->userData['user_password'] != sanitizer("user_hash", "", "user_hash")) ||
($this->data['user_id'] != fusion_get_userdata('user_id'))) {
fusion_stop($locale['error_request']);

return FALSE;
}

// check for password match
Expand Down

2 comments on commit 57c96d4

@JamieSlome
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@FrederickChan - can you confirm that this fix was made as a result of the following vulnerability report?

https://huntr.dev/bounties/b3f888d2-5c71-4682-8287-42613401fd5a/

@FrederickChan
Copy link
Member Author

@FrederickChan FrederickChan commented on 57c96d4 Oct 11, 2022 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.