aoz
August 28, 2017, 5:29pm
1
Hi,
Since I have upgraded to yunohost 2.7, just after login to my server (via the web app) I have got a “500 Internal Server Error” from nginx.
> $tail /var/log/nginx/domain.com-error.log
> /usr/share/ssowat/helpers.lua:595: in function 'ensure_user_password_uses_strong_hash'
> /usr/share/ssowat/helpers.lua:296: in function 'authenticate'
> /usr/share/ssowat/helpers.lua:857: in function </usr/share/ssowat/helpers.lua:848>, client: 192.168.1.1, server:domain.com, request: "POST /yunohost/sso/?r=aHR0cHM6Ly9raXBvcy5mci8= HTTP/1.1", host: "domain.com", referrer: "https://domain.com/yunohost/sso/?r=aHR0cHM6Ly9raXBvcy5mci8="
> 2017/08/28 19:17:01 [error] 1526#0: *9 lua entry thread aborted: runtime error: /usr/share/ssowat/helpers.lua:841: attempt to concatenate a nil value
> stack traceback:
> coroutine 0:
> /usr/share/ssowat/helpers.lua: in function 'hash_password'
> /usr/share/ssowat/helpers.lua:595: in function 'ensure_user_password_uses_strong_hash'
> /usr/share/ssowat/helpers.lua:296: in function 'authenticate'
> /usr/share/ssowat/helpers.lua:857: in function </usr/share/ssowat/helpers.lua:848>, client: 192.168.1.1, server: domain.com, request: "POST /yunohost/sso/?r=aHR0cHM6Ly9raXBvcy5mci8= HTTP/1.1", host: "domain.com", referrer: "https://domain.com/yunohost/sso/?r=aHR0cHM6Ly9raXBvcy5mci8="
I have the issue systematically, on several computers / several browsers
Any idea how to fix that?
Thanks!
Bram
August 28, 2017, 6:21pm
2
Hello,
Can you try to do something like
mkpasswd --method=sha-512 'your_password'
as the user root
in your server please? You should experience something like:
root@browny:/var/log/nginx# mkpasswd --method=sha-512 'toto'
$6$fTwVQLx3NhaLz$JstZTfHeFjF.J3Gyb/O6yJlvWPT9qho.71sXqGEnUZDr1iN3RhGceZVxmrDsFgbn1ir4UijXaXHMsjNxGzDyI0
You might want to avoid pasting the resulting string here but please tell me if this command works.
Looking at the corresponding code, my hypothesis is that you don’t have this binary of that this command failed https://github.com/YunoHost/SSOwat/blob/unstable/helpers.lua#L840-L841
aoz
August 28, 2017, 6:31pm
3
Thank you @Bram for your help.
Indeed, ‘mkpasswd’ returns “command not found”.
Some additional info, if necessary:
# yunohost -v
yunohost: 2.7.2
yunohost-admin: 2.7.2
moulinette: 2.7.2
ssowat: 2.7.2
Bram
August 28, 2017, 6:51pm
4
Thanks for your feedback.
Could you tried installing the package “whois” by doing this command as root please:
apt-get install whois -y
(yes, the whois package contains “mkpasswd” because … I don’t know, debian I guess).
Then (as root):
service nginx restart
And try to login again, that should fix it.
I’m very surprised that you don’t have mkpasswd
installed by default, we are going to add it as a dependency to ssowat for the next release.
1 Like
aoz
August 28, 2017, 6:56pm
5
It works!
Thank you a lot @Bram ,
1 Like
Aleks
August 28, 2017, 6:56pm
6
By the way can you clarify which hardware you’re using (RPi, Internet cube, old laptop/desktop, VPS, VM … ?)
aoz
August 28, 2017, 6:58pm
7
Sure: I am running an armbian kernel (armbian.com ) on Jessie on a Cubox-i 4 Pro.
1 Like
Hello there, after upgrade i got the very same problem, fixed by the same solution.
And, for the record, i also run yunohost on an armbian kernel, Jessie, orange pi pc.
cheers
Aleks
November 18, 2017, 9:59pm
9
Hello,
thanks for the feedback,
I pushed a commit upstream that should fix this, it’ll be available in the next release.
Sorry for the trouble :s