Authorization issue / bug for Windows system, needs a fix, has a workaround

23 views
Skip to first unread message

Jeff Wright

unread,
Aug 15, 2020, 11:06:44 PM8/15/20
to TiddlyWikiDev
In the most recent version of WebServer, I was unable to get authentication to work from the csv password file.

The symptom is that it just keeps displaying the authentication popup and ignoring whatever is entered.

Digging in, it turns out the problem is due to utf-8 encoding on Windows. The strings have a BOM prefix which confuses the server code when matching on the password file.

I noticed this bug came up a couple of years ago, but it seems still present.

I suggest the code be amended to detect and ignore the BOM code if it is present.

However, the workarounds are to use a text editor (on Windows) that can save to a unix text encoding (no BOM).
I have done this two ways:

EMACS in WSL, use command M-X set-buffer-file-encoding-system to utf-8-unix
NoteTab editor under document properties, has a UNIX setting for encoding.

However, it would be better to do this in code in the function that parses a CSV file.

Reply all
Reply to author
Forward
0 new messages