felixrupp / user_cas

This app provides CAS authentication support for ownCloud and Nextcloud, using the phpCAS library of jasig/apereo.
Other
21 stars 24 forks source link

Broken public share #37

Closed landryb closed 5 years ago

landryb commented 6 years ago

Describe the bug Slightly similar to #35 but not exactly the same, if nextcloud is hosted at the root of the webapp and user_cas is enabled (with login enforced), here with php 7.2 the public share links starting with /s/ are broken because they redirect to the cas login page.

The logic needs to be fixed on https://github.com/felixrupp/user_cas/blob/master/appinfo/app.php#L31 as strpos($requestUri, "/s/") will return 0 on requestUri=/s/XGJP8SJi7DNnddw and thus be considered false, and trigger the redirection to auth cas.

I locally modified the test to be strpos($requestUri, "/s/") !== FALSE and it seems to fix the issue. Dunno if other sub-uri tests should also be fixed, but i can do a PR if this fix makes sense to you.

Software (please complete the following information):

landryb commented 6 years ago

Note that with this fixed, #35 still exists as no js/css is displayed when the unauthenticated user gets to the public share.

felixrupp commented 5 years ago

Working on that!

felixrupp commented 5 years ago

@landryb

In the current 1.6.0 release (https://github.com/felixrupp/user_cas/releases/tag/1.6.0) the activation of the app is completely rewritten and will hopefully not break other apps/functions anymore.

Please test that and report back if you still have issues!

landryb commented 5 years ago

confirmed working fine with 1.6.0, public shares are accessible even if cas login is enforced