F4HTB / Universal_HamRadio_Remote_HTML5

Universal HamRadio Remote HTML5 interface
GNU General Public License v3.0
151 stars 36 forks source link

FILE auth is broken #28

Closed dblacknc closed 3 years ago

dblacknc commented 3 years ago

I couldn't get FILE authentication working and started looking.

The split of user and password here as read from the user DB file, around line 748 of UHRR:

... if x[0]!="#": db=x.split(" ") if db[0] == user and db[1] == password: ...

...results in a CR (\n) at the end of password, so the comparison always fails. As a workaround/possible fix, I added, just before the split of x into db:

x=x.strip('\n')

Now it works. I edited the user DB file using vi, on Linux. So each line has a ctrl-J at the end.

F4HTB commented 3 years ago

Thanks, I will test this asap. :)

F4HTB commented 3 years ago

issue is corrected