Skip to content

Commit

Permalink
security fix
Browse files Browse the repository at this point in the history
  • Loading branch information
damianofalcioni committed Apr 4, 2018
1 parent 5186997 commit 75941ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions ipb.php
Original file line number Diff line number Diff line change
Expand Up @@ -1099,8 +1099,10 @@ function getallheaders() {
} else {
$reportJson = json_decode(file_get_contents($reportFolderFull.'/'.$json->trackUUID.'.json'));
if($reportJson->configUUID != $json->uuid){
$reportJson->configUUID = $json->uuid;
file_put_contents($reportFolderFull.'/'.$json->trackUUID.'.json', json_encode($reportJson));
throw new Exception('trackUUID already in use by another configuration.');
//SECURITY FIX: allowing the uuid update into the tracking file (next two lines) give the possibility for a tracked user to save a new configuration using its traking uuid, stealing its traking file to the original configuration
//$reportJson->configUUID = $json->uuid;
//file_put_contents($reportFolderFull.'/'.$json->trackUUID.'.json', json_encode($reportJson));
}
}
file_put_contents($configFolderFull.'/'.$json->uuid.'.json', $jsonString);
Expand Down

0 comments on commit 75941ce

Please sign in to comment.