Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Jul 10, 2025

Backport of #53501

@backportbot backportbot bot requested review from come-nc, danxuliu and susnux July 10, 2025 18:48
@backportbot backportbot bot added this to the Nextcloud 31.0.7 milestone Jul 10, 2025
danxuliu added 2 commits July 11, 2025 02:50
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
The Theming app injects the stylesheets for the different themes in the
"<header>" element of the page, and those stylesheets are then loaded by
the browser from a "Controller" (a plain "Controller", not an
"OCSController"). The stylesheets, in turn, may also get some images
(like the background) also from the "Controller".

When handling a request to "index.php" it is checked whether the user is
logged in and, if not, a login is tried. A disabled user is explicitly
seen as not logged in, so a login is always tried in that case, but
disabled users are also explicitly prevented to log in, so the login
also fails. Due to that trying to get any of the themed stylesheets or
images with a disabled account (to be able to show the "Account
disabled" error page) fails with an HTTP status 401.

To solve that, and to avoid touching this basic logic as much as
possible, the login exception is now ignored (if the user is disabled)
for some specific requests to the Theming app.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the backport/53501/stable31 branch from dc36ba4 to ac6b073 Compare July 11, 2025 02:49
@danxuliu danxuliu marked this pull request as ready for review July 11, 2025 10:13
Copy link
Member

@danxuliu danxuliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and works 👍

@danxuliu danxuliu enabled auto-merge July 11, 2025 10:14
@danxuliu danxuliu merged commit 3f03fed into stable31 Jul 11, 2025
198 checks passed
@danxuliu danxuliu deleted the backport/53501/stable31 branch July 11, 2025 10:52
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 5, 2025
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants