Skip to content

Commit 58c54f4

Browse files
committed
Security: Fix logical flaw allowing unauthenticated users to send data to a specific table
1 parent dc24215 commit 58c54f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main/lp/storageapi.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@
6767
function storage_can_set($sv_user)
6868
{
6969
// platform admin can change any user's stored values, other users can only change their own values
70-
$allowed = ((api_is_platform_admin()) || ($sv_user == api_get_user_id()));
70+
$allowed = ((api_is_platform_admin()) || (!empty($sv_user) && $sv_user == api_get_user_id()));
7171
if (!$allowed) {
7272
echo "ERROR : Not allowed";
7373
}

0 commit comments

Comments
 (0)