mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-20 15:36:16 -04:00
Fixed password with only numbers being rejected.
This commit is contained in:
parent
8e690aa342
commit
6ee4d3daaa
1 changed files with 4 additions and 1 deletions
|
@ -149,7 +149,10 @@ const checkAccess = async (req, res, next) => {
|
||||||
if (!(await aCallFirst0('authenticate', ctx))) {
|
if (!(await aCallFirst0('authenticate', ctx))) {
|
||||||
// Fall back to HTTP basic auth.
|
// Fall back to HTTP basic auth.
|
||||||
const {[ctx.username]: {password} = {}} = settings.users;
|
const {[ctx.username]: {password} = {}} = settings.users;
|
||||||
if (!httpBasicAuth || !ctx.username || password == null || password !== ctx.password) {
|
|
||||||
|
if (!httpBasicAuth ||
|
||||||
|
!ctx.username ||
|
||||||
|
password == null || password.toString() !== ctx.password) {
|
||||||
httpLogger.info(`Failed authentication from IP ${req.ip}`);
|
httpLogger.info(`Failed authentication from IP ${req.ip}`);
|
||||||
if (await aCallFirst0('authnFailure', {req, res})) return;
|
if (await aCallFirst0('authnFailure', {req, res})) return;
|
||||||
if (await aCallFirst0('authFailure', {req, res, next})) return;
|
if (await aCallFirst0('authFailure', {req, res, next})) return;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue