Work-around for a bug in Chrome's XSS auditor
authorAlexander Ebert <ebert@woltlab.com>
Wed, 28 Jun 2017 09:35:29 +0000 (11:35 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 28 Jun 2017 09:35:29 +0000 (11:35 +0200)
wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserMailForm.class.php

index ead4b3cdb696def4add262338c2e15c4b7b9eabc..ed63cd4d021241c65968c2f3a3291a1fc8206098 100644 (file)
@@ -240,4 +240,15 @@ class TemplateAddForm extends AbstractForm {
                        'copy' => $this->copy
                ));
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function show() {
+               // work-around for a known Chrome bug that causes the XSS auditor
+               // to incorrectly detect JavaScript inside a textarea
+               @header('X-XSS-Protection: 0');
+               
+               parent::show();
+       }
 }
index 8773b7bf632abe0fcff875b8ef254788b17b048a..8063eea87b33c946dcbfd61e9099550ab328cc02 100755 (executable)
@@ -209,4 +209,15 @@ class UserMailForm extends AbstractForm {
                        'userList' => $this->userList
                ));
        }
+       
+       /**
+        * @inheritDoc
+        */
+       public function show() {
+               // work-around for a known Chrome bug that causes the XSS auditor
+               // to incorrectly detect JavaScript inside a textarea
+               @header('X-XSS-Protection: 0');
+               
+               parent::show();
+       }
 }