Skip to content

Commit

Permalink
Security: Fix logical flaw allowing unauthenticated users to send dat…
Browse files Browse the repository at this point in the history
…a to a specific table
  • Loading branch information
ywarnier committed Sep 20, 2024
1 parent dc24215 commit 58c54f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/lp/storageapi.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
function storage_can_set($sv_user)
{
// platform admin can change any user's stored values, other users can only change their own values
$allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));
$allowed = ((api_is_platform_admin()) || (!empty($sv_user) && $sv_user == api_get_user_id()));
if (!$allowed) {
echo "ERROR : Not allowed";
}
Expand Down

0 comments on commit 58c54f4

Please sign in to comment.