K-111219: Reflected XSS на /web-tools/nginx-config-generator

This commit is contained in:
Александр Гичкалов 2021-11-10 17:34:25 +04:00 committed by Aleksandr Gichkalov
parent d126616c8d
commit 28c7cfc5ac
3 changed files with 3 additions and 2 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@ -29,7 +29,7 @@ export default global => {
config['# ACME-challenge'] = '';
config['location ^~ /.well-known/acme-challenge/'] = {
root: global.https.letsEncryptRoot.computed.replace(/\/+$/, ''),
root: global.https.letsEncryptRoot.computed.replace(/(<.+>)|(\/+$)/, ''),
};
// Done!

View File

@ -208,6 +208,7 @@ THE SOFTWARE.
watch: {
'$props.data.domain': {
handler(data) {
data.computed = data.computed.replace(/<.+>/, '');
// Ignore www. if given, enable WWW subdomain
if (data.computed.startsWith('www.')) {
data.computed = data.computed.slice(4);