Skip to content

Conversation

@ChristophWurst
Copy link
Member

@ChristophWurst ChristophWurst commented Sep 10, 2025

  • Resolves: #

Summary

Nextcloud has some dynamically built js files like js/merged-template-prepend.js. These are not served by the web server but go through a controller. When the user has logged in but 2FA hasn't been passed yet, the resources are not loadable.

TODO

  • Do

How to test

  1. Turn off debug mode (important, otherwise some of the logic seems to be turned off)
  2. Set up 2FA
  3. Log out
  4. Open the browser console
  5. Log in (no 2FA yet)

master: you see a request for js/merged-template-prepend.js and it gets redirected with a HTTP 303. The browser complains about a corrupted script.
here: the file can be accessed and the browser is happy.

Checklist

@ChristophWurst ChristophWurst self-assigned this Sep 10, 2025
@ChristophWurst ChristophWurst requested a review from a team as a code owner September 10, 2025 13:16
@ChristophWurst ChristophWurst requested review from nfebe and yemkareems and removed request for a team September 10, 2025 13:16
@github-actions
Copy link
Contributor

Possible performance regression detected

Show Output
An unhandled exception has been thrown:
TypeError: array_map(): Argument #2 ($array) must be of type array, null given in /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php:35
Stack trace:
#0 /home/runner/work/server/server/apps/profiler/lib/Command/Compare.php(35): array_map()
#1 /home/runner/work/server/server/3rdparty/symfony/console/Command/Command.php(326): OCAProfilerCommandCompare->execute()
#2 /home/runner/work/server/server/core/Command/Base.php(218): SymfonyComponentConsoleCommandCommand->run()
#3 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(1078): OCCoreCommandBase->run()
#4 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(324): SymfonyComponentConsoleApplication->doRunCommand()
#5 /home/runner/work/server/server/3rdparty/symfony/console/Application.php(175): SymfonyComponentConsoleApplication->doRun()
#6 /home/runner/work/server/server/lib/private/Console/Application.php(187): SymfonyComponentConsoleApplication->run()
#7 /home/runner/work/server/server/console.php(91): OCConsoleApplication->run()
#8 /home/runner/work/server/server/occ(33): require_once('...')
#9 {main}

@ChristophWurst
Copy link
Member Author

/backport to stable31

@ChristophWurst
Copy link
Member Author

/backport to stable30

@AndyScherzinger AndyScherzinger added this to the Nextcloud 33 milestone Sep 10, 2025
@susnux susnux merged commit 8a1471d into master Sep 10, 2025
213 of 218 checks passed
@susnux susnux deleted the fix/dynamic-js-during-2fa branch September 10, 2025 21:48
@AndyScherzinger
Copy link
Member

/backport to stable32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants