[user] disallow ending profile name with a dot
This commit is contained in:
parent
f1080a847f
commit
10033905cf
|
@ -26,7 +26,10 @@ const isSpam = (email) => {
|
|||
|| email.length > 128;
|
||||
}
|
||||
|
||||
const replaceExtension = username => username.replace(/\.(txt|jpg|jpeg|png|pdf|gif|doc|docx|csv|js|css)$/i, '_$1');
|
||||
const replaceExtension = username => username
|
||||
.replace(/\.(txt|jpg|jpeg|png|pdf|gif|doc|docx|csv|js|css|html)$/i, '_$1')
|
||||
.replace(/\.$/, '')
|
||||
;
|
||||
|
||||
const saveAuthenticator = async (db, type, user, payload, validForMinutes = null) => {
|
||||
const id = ulid();
|
||||
|
|
Reference in New Issue