ini writing error if password has special characters

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
jennyjansen
Newbie
Newbie
Posts: 3
Joined: March 20th, 2017, 7:44 pm

ini writing error if password has special characters

Post 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)
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: ini writing error if password has special characters

Post by safihre »

What version of Sabnzbd is this?
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
jennyjansen
Newbie
Newbie
Posts: 3
Joined: March 20th, 2017, 7:44 pm

Re: ini writing error if password has special characters

Post 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.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: ini writing error if password has special characters

Post 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.
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: ini writing error if password has special characters

Post 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?
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: ini writing error if password has special characters

Post 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)?
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: ini writing error if password has special characters

Post 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.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
jennyjansen
Newbie
Newbie
Posts: 3
Joined: March 20th, 2017, 7:44 pm

Re: ini writing error if password has special characters

Post 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.
Post Reply