Skip to content

Commit e603826

Browse files
authored
Merge pull request #38374 from nextcloud/pulsejet/patch-ubr-nonce
webpack: add nonce to unsupported-browser-redirect chunk
2 parents b2e3426 + 60a7610 commit e603826

3 files changed

Lines changed: 8 additions & 3 deletions

File tree

core/src/unsupported-browser-redirect.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@
1919
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2020
*/
2121

22+
import { getRequestToken } from '@nextcloud/auth'
23+
24+
// eslint-disable-next-line camelcase
25+
__webpack_nonce__ = btoa(getRequestToken())
26+
2227
if (!window.TESTING && !OC?.config?.no_unsupported_browser_warning) {
2328
window.addEventListener('DOMContentLoaded', async function() {
2429
const { testSupportedBrowser } = await import('./utils/RedirectUnsupportedBrowsers.js')

dist/core-unsupported-browser-redirect.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)