YunoHost-Apps / pleroma_ynh

Pleroma package for YunoHost: A free, federated social networking server built on open protocols.
https://pleroma.social/
GNU Affero General Public License v3.0
31 stars 14 forks source link

Installation fails when admin password has spaces #183

Closed rakoo closed 2 years ago

rakoo commented 2 years ago

First of all, thanks for your work !

Description

I tried to install pleroma on my yunohost server and my password has spaces in it. Unfortunately this makes the install fail.

Context

Steps to reproduce

Logs

I'm not putting logs in yunopaste because they contain my password. Here are the lines that show the issue, edited without my real password:

2021-11-10 15:20:25,930: DEBUG - + sleep 60
2021-11-10 15:21:25,932: DEBUG - + su pleroma -s /bin/bash -lc '/var/www/pleroma/pleroma/bin/pleroma_ctl user new rakoo m@rako.space --password ********** --moderator --admin -y'
2021-11-10 15:21:26,460: WARNING - ** (MatchError) no match of right hand side value: {[password: "my", moderator: true, admin: true, assume_yes: true], ["password", "has", "spaces"], []}
2021-11-10 15:21:26,461: WARNING -     lib/mix/tasks/pleroma/user.ex:18: Mix.Tasks.Pleroma.User.run/1
2021-11-10 15:21:26,461: WARNING -     (stdlib 3.12.1) erl_eval.erl:680: :erl_eval.do_apply/6
2021-11-10 15:21:26,462: WARNING -     (elixir 1.10.3) lib/code.ex:341: Code.eval_string_with_error_handling/3
yalh76 commented 2 years ago

Yes but I found no solution to manage that

rakoo commented 2 years ago

I'm sorry if this sounds dumb, but with quotes around $password here, isn't that enough ?

yalh76 commented 2 years ago

Have already tryed and didn't worked, but we still can try at #185

rakoo commented 2 years ago

Ok great

yalh76 commented 2 years ago

Adding quotes, make it fails: https://ci-apps-dev.yunohost.org/ci/job/4419

271204 WARNING ** (MatchError) no match of right hand side value: {[password: "1Strong", moderator: true, admin: true, assume_yes: true], ["Password", "With", "Spaces"], []}
rakoo commented 2 years ago

Crap, I guess there's no easy solution for this one. Feel free to close it if you want until someone can find a workaround