mailpile/Mailpile

Broken locale causes invalid password?

lukateras opened this issue · 4 comments

I thought I've lost my email archive, thankfully not :-)

Failed to load language C                                                      
Failed to configure i18n (C). Using fallback.                                  
Elapsed: 0.007s (health: We are healthy!)                                      
Elapsed: 0.000s (motd: Message Of The Day: Loaded)
=============================================================================
Mailpile.py              a tool             Copyright 2013-2018, Mailpile ehf
 v1.0.0rc2         for searching and               <https://www.mailpile.is/>
               organizing piles of e-mail

This program is free software: you can redistribute it and/or modify it under
the terms of either the GNU Affero General Public License as published by the
Free Software Foundation. See the file COPYING.md for details.

The Web interface address is: http://localhost:33411/

   * Type `help` for instructions or `quit` to quit.
   * Long running operations can be aborted by pressing: <CTRL-C>
   * You can log in using the `login` command.
   * Check your web browser!

Message Of The Day, 2018-01-14:

    Hello world!
    
    Our second 1.0 release candidate is available from Github.
    Debian packages will be available on www.mailpile.is within a few days.
    Happy 2018!

*** Your Mailpile is up to date ***

mailpile> login

Your password: 
Failed to load language C
Failed to configure i18n (C). Using fallback.
Bad passphrase for None
login error: Invalid password, please try again
Elapsed: 1.510s (login: Invalid password, please try again)

{
    "login_banner": "", 
    "login_failures": [
        1523259267, 
        1523259272
    ]
}

screenshot_2018-04-09_07-36-37

When I move ~/.local/share/Mailpile to another environment without broken locales and use the same password, it works. My password contains whitespace.

Locales in all other apps work fine, my locale output:

LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

So not sure where Mailpile gets C locale from. It also worked fine until yesterday and I don't remember making any changes to this machine that would cause that to happen...

That's weird.

I'll be honest though, I doubt I'm going to be able to do anything about this any time soon, since you haven't given me enough information about "broken locales" to allow me to reproduce. I don't even know where I'd start.

Unless you're basing your "broken locales" comment on the messages Mailpile prints - that's a misunderstanding. Those messages are not really indicative of any problems. I should make those messages go away, they confuse people.

Yes, I've thought that locales are broken based on that message, because I don't get an equivalent message in that other environment where it works. I've tried enabling verbose logging as documented in CONTRIBUTING.md but I didn't get any useful logs, so I'm not sure how to debug that either.

I'll try print debugging around password check when I have some free time :-)

Can't reproduce anymore.