Page 1 of 1

ini writing error if password has special characters

Posted: March 20th, 2017, 8:00 pm
by jennyjansen
i got a new login and password for my old usenet provider, so put them into the login details, tested server, test server worked.

but in the home screen i have been spammed with an error "Cannot write <path> to INI file" and the download did not start. after restarting and checking my login details i noticed that my old login details were still present.
even with some google magic none of the solutions were helping or even applicable. so i decided to manually update the ini file, and i found the error upon revisiting the ini file after same error; my old password was "hnA_4j9g1D2§4" which snbnzbd turned into "hnA_4j9g1D2 <some strange chinese looking character> 4"

to solve this i logged to my usenet provider, changed the password into one without the "§" character, updated the login details in sabnzbd and everything works fine now.

tl;dr
sabnzdb cannot deal with at least the character "§" *1 (maybe more) in password (maybe name, too) and will change it to something else, which will result in login and ini error.


*1
§ = The section sign (Unicode U+00A7 § Section sign, HTML &sect;, TeX \S)

Re: ini writing error if password has special characters

Posted: March 21st, 2017, 12:53 am
by safihre
What version of Sabnzbd is this?

Re: ini writing error if password has special characters

Posted: March 21st, 2017, 4:18 pm
by jennyjansen
os: win7 x64
had following sabnzbd verisons while this error ccured on my pc:
1.2.2 (or close to it) updated it to 1.2.3 and finally tried 2.0.0.beta1
all were affected by the same issue.

Re: ini writing error if password has special characters

Posted: March 21st, 2017, 4:33 pm
by sander
On Linux, with SAB 2.0.0 Beta1:

I set 你好世界 as a password for a newsserver, saved it, and then sabnzbd.ini showed something strange:

Code: Select all

host = news.giganews.com
timeout = 120
ssl_verify = 2
send_group = 0
password = O`Y}NuL
optional = 0
So: O`Y}NuL ... that does not look good, and seems to confirm what the OP says.

Re: ini writing error if password has special characters

Posted: March 21st, 2017, 4:54 pm
by sander
To make analyze a bit easier, I used "界" as password.
According to http://unicode.scarfboy.com/?s=U%2B754C that's 0x754C

Now sabnzbd.ini:

$ cat .sabnzbd/sabnzbd.ini | grep -B10 -A20 giganews | grep password | tail -1 | hd
00000000 70 61 73 73 77 6f 72 64 20 3d 20 75 4c 0a |password = uL.|
0000000e

so:
uL ... which is not good
75 4c ... which is good

So the value is correct, but there is some mis-interpretation?

Re: ini writing error if password has special characters

Posted: March 21st, 2017, 4:59 pm
by sander
and now back to jennyjansen:

http://www.theasciicode.com.ar/extended ... e-245.html tells the "section sign" is in the Extended ASCII set. So no Unicode needed, but confusion with Unicode is easy.
I'm therefore quite surprised your newsserver provider puts a non-basic-ASCII in a password.

Did you try copy-pasting the password from the newsserver into SABnzbd's GUI, or the sabnzbd.ini (first stop SABnzbd)?

Re: ini writing error if password has special characters

Posted: March 22nd, 2017, 2:09 am
by safihre
I wonder if that would even work when trying to open the connection. I'm not sure if we can reliably transmit non-ascii as username/password to the server.

Re: ini writing error if password has special characters

Posted: March 22nd, 2017, 7:59 pm
by jennyjansen
the newsserver provider did not put a non-basic-asciii in a password, it asked me to create a password so i randomly hit on my heayboard and "§" was one of the keys i hit (it is shift-3 on my layout).

as initialy stated, the pasting of the password with the §-character worked to the extent, that sabnzbd could connect to the server when i hit "test server" in the server tab of the options. the error occured only later when sabnzbd had to write the password into the ini file. even when i corrected the password in the ini file later myself, sabnzbd changed the ini file and replaced the correct character with some other, wrong character.

i avoided the issue by changing my password to default characters. but others might not be able to find the issue, or even not able to change passwords for some reason.