Documentation & bug reporting acknowledgmentYes, I read it Describe your problemHi, As in this issue, I'm having trouble using special characters in passwords for the “remoteinventory” task. The # character does not seem to be accepted. You can see that the password is truncated just before # I tried to escape the character to get around the problem, but it doesn't work thx |
Replies: 4 comments 1 reply
|
The GLPI Agent added percent-decoding for remote inventory credentials in 1.9: Since you're on 1.19, encode the glpi-agent --task remoteinventory \
--remote='ssh://myuser:password-with-%23-here@192.168.1.29' \
--logger=stderr --debug --debugThe quotes protect the argument from the shell; One more thing: the discussion includes what looks like a real password. If it is, rotate it before testing again. |
|
Of course, these are fake passwords, usernames and IP addresses. It works Is this documented anywhere ? |
|
Thanks, that narrows it down. I ran the 1.19 URL parser with your exact sample. This value: is parsed as: So To remove the remaining URI ambiguity, try the fully encoded password and quote the whole argument: Also, plain Could you paste the new debug lines starting at |
|
Sorry, I’ve edited my last comment |
The
#is being treated as the start of a URI fragment. Escaping it for the shell won't help, because the truncation happens later when GLPI parses the URI.GLPI Agent added percent-decoding for remote inventory credentials in 1.9:
be309b3
Since you're on 1.19, encode the
#as%23and quote the complete URI, for example:glpi-agent --task remoteinventory \ --remote='ssh://myuser:password-with-%23-here@192.168.1.29' \ --logger=stderr --debug --debugThe quotes protect the argument from the shell;
%23is what prevents the URI parser from treating the rest as a fragment.One more thing: the discussion includes what looks like a real password. If it is, rotate it before testing again.