Răsfoiți Sursa

apply to src/server/form

Yuki Takei 7 ani în urmă
părinte
comite
f9f17b79b8

+ 1 - 1
src/server/form/admin/securityGoogle.js

@@ -3,6 +3,6 @@ const form = require('express-form');
 const field = form.field;
 
 module.exports = form(
-  field('settingForm[google:clientId]').trim().is(/^[\d\.a-z\-\.]+$/),
+  field('settingForm[google:clientId]').trim().is(/^[\da-z\-.]+$/),
   field('settingForm[google:clientSecret]').trim().is(/^[\da-zA-Z\-_]+$/),
 );

+ 1 - 1
src/server/form/admin/securityPassportLdap.js

@@ -6,7 +6,7 @@ module.exports = form(
   field('settingForm[security:passport-ldap:isEnabled]').trim().toBooleanStrict().required(),
   field('settingForm[security:passport-ldap:serverUrl]').trim()
       // https://regex101.com/r/E0UL6D/1
-      .is(/^ldaps?:\/\/([^\/\s]+)\/([^\/\s]+)$/, 'Server URL is invalid. <small><a href="https://regex101.com/r/E0UL6D/1">&gt;&gt; Regex</a></small>'),
+      .is(/^ldaps?:\/\/([^/\s]+)\/([^/\s]+)$/, 'Server URL is invalid. <small><a href="https://regex101.com/r/E0UL6D/1">&gt;&gt; Regex</a></small>'),
   field('settingForm[security:passport-ldap:isUserBind]').trim().toBooleanStrict(),
   field('settingForm[security:passport-ldap:bindDN]').trim()
       // https://regex101.com/r/jK8lpO/1