Skip to content

Commit

Permalink
Merge pull request #4823 from markusguenther/bugfix/impersonation-res…
Browse files Browse the repository at this point in the history
…tore

BUGFIX: More precise selection of the DomNode with CSFR token
  • Loading branch information
mhsdesign authored Jan 13, 2024
2 parents 61fbc28 + 871b32e commit 600e9ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { RestoreButton } from '../../Templates/RestoreButton'
const BASE_PATH = '/neos/impersonate/'
export default class UserMenu {
constructor(_root) {
const csfrTokenField = document.querySelector('[data-csrf-token]')
const csfrTokenField = document.querySelector('.neos-user-menu[data-csrf-token]')
this._csrfToken = !isNil(csfrTokenField)
? csfrTokenField.getAttribute('data-csrf-token')
: ''
Expand Down
2 changes: 1 addition & 1 deletion Neos.Neos/Resources/Public/JavaScript/Main.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Neos.Neos/Resources/Public/JavaScript/Main.min.js.map

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {ImpersonateButton} from '../../Templates/ImpersonateButton'
const BASE_PATH = '/neos/impersonate/'
export default class UserManagement {
constructor(_root) {
const csfrTokenField = document.querySelector('[data-csrf-token]')
const csfrTokenField = document.querySelector('.neos-user-menu[data-csrf-token]')
this._root = _root
this._csrfToken = !isNil(csfrTokenField) ? csfrTokenField.getAttribute('data-csrf-token') : ''
this._apiService = new ApiService(BASE_PATH, this._csrfToken)
Expand Down

0 comments on commit 600e9ac

Please sign in to comment.