mirror of
https://github.com/CyberMind-FR/secubox-deb.git
synced 2026-07-29 09:14:33 +00:00
The official Nextcloud mobile client (Android/iOS) uses HTTP Basic with an app-password and does NOT carry browser SSO cookies. With the auth_request gate on `location /` in the NC public vhost, every /remote.php/webdav/* and /ocs/* call returned 401 → redirect to sso.gk2.secubox.in/, which the mobile client can't render → auth lockout loop. The phone then triggered NC's own bruteforce throttle. Comment out (don't delete) the 4 SSO-related lines in `location /`: - auth_request /__sbx_auth_verify; - error_page 401 = @sbx_auth_login; - auth_request_set $sbx_user ... - auth_request_set $sbx_groups ... plus the two proxy_set_header X-Forwarded-User/Groups inside the proxy block. The @sbx_auth_login + /__sbx_auth_verify blocks below are kept for revert symmetry — uncomment the four lines + the X-Forwarded-User/ Groups to restore SSO. NC handles its own web login + 2FA + (newly disabled at runtime) bruteforce protection. Verified on gk2 after the live fix: curl -A 'Nextcloud-android' https://nc/status.php → 200 OK curl -A 'Nextcloud-android' https://nc/remote.php/webdav/ → 401 (correct — NC's own Basic auth challenge) Trade-off (flagged in #394 issue): drops SSO for desktop browser users too. They go to NC's own login page. To preserve SSO on desktop while opening mobile-only paths (/remote.php/*, /ocs/*, /public.php/*) is more complex and deferred to a follow-up. Bumped secubox-nextcloud 1.3.4 → 1.3.5. |
||
|---|---|---|
| .. | ||
| nextcloud-vhost.conf | ||
| nextcloud.conf | ||