Verified Commit 65fdf71b authored by Chocobozzz's avatar Chocobozzz
Browse files

Handle special chars in ldap username

parent 66b13f19
......@@ -170,8 +170,11 @@ async function login (peertubeHelpers, settingsManager, options) {
return res(null)
}
let username = user[usernameProperty] || ''
username = username.replace(/[^a-z0-9._]/g, '_')
return res({
username: user[usernameProperty],
username,
email: user[mailProperty]
})
})
......
{
"name": "peertube-plugin-auth-ldap",
"version": "0.0.3",
"version": "0.0.4",
"description": "Add LDAP support to login form in PeerTube.",
"engine": {
"peertube": ">=2.2.0"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment