-
-
Notifications
You must be signed in to change notification settings - Fork 551
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
Failed Upgrade from Git:Master (2017-01-17) to 2.1.27.7 #1816
Comments
Do you have something inside teampass-seckey.txt file? |
SOLVED: ok for those having exactly this issue: "PHP Fatal error: Uncaught Defuse\Crypto\Exception\BadFormatException: Encoding::hexToBin() input is not a hex string.", NOT "file not found" or "string is shorter than expected". Probably some of you like me just copied the key from the original server and paste it into a new file in the other server, because of migrating between versions or whatever,... The point is: When you copy & paste the secret key into the file teampass-seckey.txt you're adding probably more characters into the file than you should. Specificly a non HEX character (0A). I wasn't able to see it even with vim by using ":set list" command. So I ended up checking the md5sum of both files and having different results I decided to use a HEX editor to compare the files. The first one had the key, and the second one had the key and a ASCI: ' ' at the end (HEX:'0A') Now everything is working again. |
This is really interesting and I didn't thought about it. @zpol Many thanks for sharing this return of experience! |
@zpol Thanks. I actually just had one of my team members move the data manually (!) on an internship from one server to the other as this was quite some time ago, but this issue should be useful for others. Since that issue was posted we've been running 1 year without issues. |
Steps to reproduce
Expected behaviour
Upgrade to latest revision
Actual behaviour
DB Upgrade hangs at 2 phases:
Cust_fields.php (can restart and it goes to next)
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "NOTICE: PHP message: PHP Fatal error: Uncaught Defuse\Crypto\Exception\BadFormatException: Encoding::hexToBin() input is not a hex string. in /www/teampass/includes/libraries/Encryption/Encryption/Encoding.php:65"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "Stack trace:"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "#0 /www/teampass/includes/libraries/Encryption/Encryption/Encoding.php(164): Defuse\Crypto\Encoding::hexToBin('def00000b37f3b1...')"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "#1 /www/teampass/includes/libraries/Encryption/Encryption/Key.php(38): Defuse\Crypto\Encoding::loadBytesFromChecksummedAsciiSafeString('\xDE\xF0\x00\x00', 'def00000b37f3b1...')"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "#2 /www/teampass/sources/main.functions.php(383): Defuse\Crypto\Key::loadFromAsciiSafeString('def00000b37f3b1...')"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "#3 /www/teampass/sources/items.queries.php(2420): cryption('def502008d3fc1c...', 'def00000b37f3b1...', 'decrypt')"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: "#4 {main}"
[17-Jul-2017 08:13:24] WARNING: [pool www] child 298 said into stderr: " thrown in /www/teampass/includes/libraries/Encryption/Encryption/Encoding.php on line 65"
Server configuration
Docker / Alpine:edge
Nginx 1.13 / PHP-FPM 7.0
MariaDB 10.2.27
**Teampass version: 2.1.27.7
Upgrade from git master branch
Client configuration
Browser:
Firefox
Operating system:
Linux
Logs
Web server error log
Firebug log (How to?)
The text was updated successfully, but these errors were encountered: