GreenMeteor / codebox

Allows you to add and use HTML snippets on your sidebar
3 stars 5 forks source link

Fix: Nonce #6

Closed ArchBlood closed 8 months ago

ArchBlood commented 8 months ago

resolves #5

ArchBlood commented 8 months ago

Using either Security::getNonce() or Html::nonce() seems to only apply nonce="" which is a rather strange behavior, in the view file if I were to wrap $htmlCode in Html:: it won't work. So I may have something else to look at later.

ArchBlood commented 8 months ago

Okay, so the current method does apply the nonce="random" but doesn't display within the widget view, I've checked using var_dump($nonce) which does show the correct value, I've also tested other files such as the Module.php, CodeboxFrame.php and even the ConfigureForm.php which all of these do the same thing and return nonce="" in the view only, but I can confirm that the nonce is applied correctly in all cases it's just not displaying the value for widget views.

ArchBlood commented 8 months ago

Seems like this is an issue within the legal module as well.