mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-28 06:59:33 +00:00
Fixes not possible to use dot character in username (#6737)
This commit is contained in:
parent
72622f9cdf
commit
d63028efaa
5 changed files with 5 additions and 5 deletions
2
httpdocs/js/ntop.min.js
vendored
2
httpdocs/js/ntop.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -57,7 +57,7 @@ const REGEXES = {
|
|||
url: "^(https?\:\/\/[^\/\\s]+(\/.*)?)$",
|
||||
emailUrl: "^smtps?:\/\/[-a-zA-Z0-9:.]{1,256}+$",
|
||||
macAddress: "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$",
|
||||
username: "^(?=[a-zA-Z0-9._@!-?]{3,30}$)(?!.*[_.]{2})[^_.].*[^_.]$",
|
||||
username: "^[a-zA-Z0-9._@!-?]{3,30}$",
|
||||
singleword: "^(?=[a-zA-Z0-9._\-]{3,253}$)(?!.*[_.\-]{2})[^_.\-].*[^_.\-]$",
|
||||
email: "^([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*)$",
|
||||
https: "^https?://.+$",
|
||||
|
|
|
|||
|
|
@ -260,7 +260,7 @@ end
|
|||
|
||||
local function validateUsername(p)
|
||||
-- A username (e.g. used in ntopng authentication)
|
||||
return(validateSingleWord(p) and (string.find(p, "%.") == nil))
|
||||
return(validateSingleWord(p))
|
||||
end
|
||||
|
||||
local function licenseCleanup(p)
|
||||
|
|
|
|||
|
|
@ -3032,7 +3032,7 @@ end
|
|||
|
||||
function getUsernameInputPattern()
|
||||
-- maximum len must be kept in sync with MAX_PASSWORD_LEN
|
||||
return [[^(?=[a-zA-Z0-9._@!-?]{3,30}$)(?!.*[_.]{2})[^_.].*[^_.]$]]
|
||||
return [[^[a-zA-Z0-9._@!-?]{3,30}$]]
|
||||
end
|
||||
|
||||
function getPasswordInputPattern()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue