animetosho / Nyuu

Flexible usenet binary posting tool
224 stars 32 forks source link

Nzb password issue with "&" character. #134

Closed dystopia2017 closed 3 weeks ago

dystopia2017 commented 3 weeks ago

Hello. I have been playing around with obfuscation and using a password. I am using bitwarden's cli tool to generate 1 off passwords for each posting. If a password is generated that contains an "&" character, it get's replaced as & in the nzb.

For example %Apps%\nyuu -M password="%rpwd%" -h %serv% --ssl -u %user% -p %pass% -f %from% -g %grps% %suba% "%flnm% %subb%" -n 20 -o "%Nzbd%\%inpt%.nzb" "%Post%\%flnm%"

%rpwd% expands to j@CHQGF9eTiFPTL3wMrFSYy8S5qw8hUiQuydSjVgudc*qMvQu6CfnnHVRar^yhU6r27cvjuuXYib4&v5hd@gmY6Dyx$Mfo*6%a2pK6i%4U9Pqqwj6Lj5b^ZUlo6YboE

and the password line in the nzb is <head> <meta type="password">j@CHQGF9eTiFPTL3wMrFSYy8S5qw8hUiQuydSjVgudc*qMvQu6CfnnHVRar^yhU6r27cvjuuXYib4&amp;v5hd@gmY6Dyx$Mfo*6%a2pK6i%4U9Pqqwj6Lj5b^ZUlo6YboE</meta> </head>

I can find and replace it back to & or generate passwords without special characters for now. But maybe it can be fixed? Kind Regards -Dystopia

dystopia2017 commented 3 weeks ago

Actually I don't think this is an issue at all because testing downloading from the nzb, the client was able to extract it fine.

animetosho commented 3 weeks ago

Yeah, I'm not sure what the issue is. Replacing '&' with &amp; is correct and intentional behaviour.

'&' has a special meaning in XML, so it needs to be replaced with an escape sequence.

dystopia2017 commented 3 weeks ago

Yeah my bad, I thought it was some bug.

animetosho commented 3 weeks ago

All good, glad we could sort it out :)