owncloud / guests

:family: Share with externals easily via email address
https://marketplace.owncloud.com/apps/guests
GNU General Public License v2.0
6 stars 13 forks source link

fix: harden apis #617

Closed DeepDiver1975 closed 7 months ago

DeepDiver1975 commented 7 months ago

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

Checklist:

DeepDiver1975 commented 7 months ago

Acceptance test 💥

DeepDiver1975 commented 7 months ago

@phil-davis mind having a look? THX

phil-davis commented 7 months ago

@phil-davis mind having a look? THX

I'm out for 2 hours, but will look again then.

if (!\in_array($app, $whitelist, true))

If I remove the true (strict) parameter from that, then the guest can login and tests pass. At that point $app is "files" and "files" is in the $whitelist array, so the strict in_array should work just the same as without strict. I need to look at what weird stuff is happening with https://www.php.net/manual/en/function.in-array.php in PHP 7.4

The test gets the guest logged in but the list of files is not shown: Screenshot from 2024-01-23 13-58-08

sonarcloud[bot] commented 7 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud