Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin interface login not working after changing password with pihole -a -p #1614

Closed
srvaroa opened this issue Oct 24, 2020 · 11 comments
Closed

Comments

@srvaroa
Copy link

srvaroa commented Oct 24, 2020

Versions

  • Pi-hole version is v5.1.2 (Latest: v5.1.2)
  • AdminLTE version is v5.1.1 (Latest: v5.1.1)
  • FTL version is v5.2 (Latest: v5.2)

Platform

Expected behavior

After running pihole -a -p <new_password>, it should be possible to log in via the web interface with <new_password>

Actual behavior / bug

Login doesn't work.

Steps to reproduce

As noted above.

Debug Token

  • URL:

https://tricorder.pi-hole.net/1qy00pb1zh

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

  • Removing the password does work (pihole -a -p, then entering blank password).
  • After setting a password, I do see WEBPASSWORD updated at /etc/pihole/setupVars.conf
  • I've tried setting the password and rebooting before trying to log in without success
@PromoFaux
Copy link
Member

I wonder if it is something to do with a combination of characters that you are using. Hard to tell, and the password is not stored in the debug log.

Could you try something simple like pihole -a -p test1234 and tell me if it works?

@srvaroa
Copy link
Author

srvaroa commented Oct 24, 2020

Hi, I've tried with simple ones (e.g. hello), but no luck.

@PromoFaux
Copy link
Member

What is the output of the following, please?

pihole -a -p hello
cat /etc/pihole/setupVars.conf | grep WEBPASSWORD

@srvaroa
Copy link
Author

srvaroa commented Oct 24, 2020

WEBPASSWORD=d7914fe546b684688bb95f4f888a92dfc680603a75f23eb823658031fff766d9

@PromoFaux
Copy link
Member

OK, so that is the correct value. What do you see when you try to log in on the web interface? I have just tried it myself, and it works...

hello_works

If it does not work for you, please include whether or not you see any console errors in the web browser's developer tools (usually F12, depending on the browser you are using)

Out of interest, what browser are you using?

@srvaroa
Copy link
Author

srvaroa commented Oct 24, 2020

I'm on Firefox 78.4.0esr. There are some errors in the console that might be related. I have just tested with private mode and it does work well, and those errors are not shown. Interestingly, they don't appear in private mode.

image

In any case it doesn't really look like a bug on the UI side so feel free to close the issue.

Thanks a lot for your help!

@PromoFaux
Copy link
Member

Ah, this may already be dealt with in development, but I am not sure. I'll transfer this issue to the web repo until I've had a chance to confirm.

@PromoFaux PromoFaux transferred this issue from pi-hole/pi-hole Oct 25, 2020
@PromoFaux
Copy link
Member

I've tried latest firefox on both master and development, and while they both show the warning, it still allows the login.

Gif from dev below:

vDev

I also tried 78.4.0esr, and am unable to reproduce. As you say @srvaroa, it worked in private browsing mode, so the cookie warning might be a red herring at this stage... maybe you have some extension that is preventing login? Does it allow you to log in if you don't check the "Remember Me" button?

@XhmikosR - might need you to jog my memory! We did something with the cookie types before the last release, no? Should it be something other?

@XhmikosR
Copy link
Contributor

XhmikosR commented Oct 25, 2020

The only related change I can think of is #1350. #1447 and the SameSite attribute is missing which is why I made https://github.com/pi-hole/AdminLTE/compare/cookies but I never got to finish it to support old PHP versions.

I'd manually clear the cookie.

@PromoFaux
Copy link
Member

I could have sworn we'd already added in the SameSite=Lax, stuff, apparently not! It's been a long year... I'll attempt to answer some questions over on #1447

@PromoFaux PromoFaux mentioned this issue Oct 27, 2020
@github-actions
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants