Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented Jul 10, 2025

Backport of #53501

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the backport/53501/stable30 branch from 83ca183 to 1e193a7 Compare July 11, 2025 02:49
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.

The clouds.jpg file was not available in stable30, so the file and its
license were copied from the commit that introduced them in newer
branches, 19ce362.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@danxuliu danxuliu force-pushed the backport/53501/stable30 branch from 1e193a7 to c6f8702 Compare July 11, 2025 10:12
@danxuliu danxuliu marked this pull request as ready for review July 11, 2025 10:14
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:15
@danxuliu danxuliu merged commit 9899c7b into stable30 Jul 11, 2025
194 of 199 checks passed
@danxuliu danxuliu deleted the backport/53501/stable30 branch July 11, 2025 11:54
@nextcloud-bot nextcloud-bot mentioned this pull request Aug 5, 2025
5 tasks
@nextcloud-bot nextcloud-bot mentioned this pull request Sep 25, 2025
2 tasks
@blizzz blizzz mentioned this pull request Oct 14, 2025
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.

4 participants