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

Auth: Running the "photoprism users reset" command should also recreate the "auth_sessions" table #4242

Closed
lapo-luchini opened this issue May 9, 2024 · 5 comments
Assignees
Labels
cli Command-Line Interface (CLI) enhancement Refactoring, improvement or maintenance task released Available in the stable release

Comments

@lapo-luchini
Copy link

lapo-luchini commented May 9, 2024

PLEASE PROCEED ONLY IF YOU ARE ABSOLUTELY SURE THAT THIS IS NOT A TECHNICAL SUPPORT INCIDENT AND/OR POSSIBLY A PROBLEM WITH SOME OTHER SOFTWARE YOU ARE USING. VISIT https://www.photoprism.app/kb/getting-support TO LEARN MORE ABOUT OUR SUPPORT OPTIONS. THANK YOU FOR YOUR CAREFUL CONSIDERATION!


1. What is not working as documented?

After migration from 231128 to 240420 login does not work anymore, when password is actually wrong a 401 with {error:"Invalid credentials"} is received, but when password is right a 200 with {error:"Invalid credentials"} is received.

image

2. How can we reproduce it?

  1. Upgrade (with no errors)
  2. Try login (to no avail)
  3. Try photoprism user reset + photoprism passwd admin
  4. Try login again (to no avail)
  5. Check logs: nothing at all is shown (even with --debug and --trace)

3. What behavior do you expect?

Actual login.
Give us a clear and concise description of what you expect.

4. What could be the cause of your problem?

With zero error logs I really don't know.
I'd like to know how to proceed with debug.
I build the software (on FreeBSD) by myself, and can easily try patches.

5. Can you provide us with example files for testing, error logs, or screenshots?

Would be a bit difficult.

6. Which software versions do you use?

a. photoprism version 240420-240420-ef5f14b-FreeBSD-amd64-DEBUG-build-240508
b. MariaDB 10.11.7
c. FreeBSD 14.0
d. Firefox
e. uBlock Origin

7. On what kind of device is PhotoPrism installed?

Home server / NAS, based on Intel i7.
FreeBSD 14.0, root on ZFS.

8. Do you use a Reverse Proxy, Firewall, VPN, or CDN?

    server {
        listen       443 ssl http2;
        listen       [::]:443 ssl http2;
        server_name  <domain>;

        ssl_certificate     /var/db/acme/certs/<domain>/fullchain.cer;
        ssl_certificate_key /var/db/acme/certs/<domain>/foto.lapo.it.key;
        add_header Strict-Transport-Security "max-age=31536000";

        location / {
            proxy_pass http://127.0.0.1:2342/;
            # Websocket
            proxy_buffering off;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
        }
    }
@lapo-luchini lapo-luchini added the bug Something isn't working label May 9, 2024
@lastzero
Copy link
Member

lastzero commented May 9, 2024

Did you try all of this?

If you've been building from the develop branch (unstable) before, you should certainly run the "photoprism auth reset" command as mentioned in our docs.

Logs should also work on FreeBSD?

@lastzero lastzero added needs-analysis Requires further investigation and removed bug Something isn't working labels May 9, 2024
@lapo-luchini
Copy link
Author

Ohhh, auth reset did it!
I did try user reset and didn't notice they weren't the same command, so I thought I already did it.
Thanks!

lastzero added a commit that referenced this issue May 10, 2024
This also adds a more detailed description to the photoprism auth reset
and "photoprism users reset" sub commands to explain what they do.

Signed-off-by: Michael Mayer <michael@photoprism.app>
@lastzero
Copy link
Member

In order to avoid any confusion, these changes will recreate the auth_sessions database table when you run the photoprism users reset --yes command in a terminal. They also add a more detailed description of the photoprism auth reset and photoprism users reset subcommands to better explain what they do.

@lastzero lastzero added enhancement Refactoring, improvement or maintenance task cli Command-Line Interface (CLI) and removed needs-analysis Requires further investigation labels May 10, 2024
@lastzero lastzero changed the title No longer able to login after upgrade Auth: Running the "photoprism users reset" command should also recreate the "auth_sessions" table May 10, 2024
@lastzero lastzero reopened this May 10, 2024
@lastzero lastzero added the please-test Ready for acceptance test label May 10, 2024
@lastzero
Copy link
Member

I've also added more notes on this to our documentation, for example:

@graciousgrey graciousgrey added tested Changes have been tested successfully and removed please-test Ready for acceptance test labels May 20, 2024
@jfbordelais
Copy link

Bonjour, j ai perdu mon mot de passe de PhotoPrism..comment le réinitialiser ? j ai installé PhotoPrism depuis les extensions de OMV .message erreur :"Les informations d'identification sont invalides" login : admin , MdP: ?
merci d avance

@graciousgrey graciousgrey added released Available in the stable release and removed tested Changes have been tested successfully labels May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command-Line Interface (CLI) enhancement Refactoring, improvement or maintenance task released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

4 participants