-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authentication does not work after #259 #260
Comments
This is generally considered to be a good thing. @goekce: what version are you running? |
#259 replaces temp1 = new Uint8Array([186, 38, 43, 41, 33, 251, 143, 178]);
console.log(String.fromCharCode.apply(null, temp1));
console.log(new TextDecoder().decode(temp1)); output:
If we try to decode using UTF-16 to match their output: temp1 = new Uint8Array([186, 38, 43, 41, 33, 251, 143, 178]);
console.log(String.fromCharCode.apply(null, temp1));
console.log(new TextDecoder('utf-16').decode(temp1)); output:
Still different :( . We see four characters in the latter case because UTF-16 requires two bytes for a single char. But why does the first not work similarly? The reason is that we map the temp1 = new Uint8Array([186, 38, 43, 41, 33, 251, 143, 178]);
console.log(String.fromCharCode.apply(null, temp1));
console.log(new TextDecoder('utf-16').decode(new Uint16Array(temp1))); output:
Above would fix the problem I believe but why did the code encode uint8 arrays using UTF-16 ( I am running v4.4.5, but I believe this function is also used for encoding the password. I will try to print the password tomorrow. |
Oh, you mean actually I should not use the latest HTML5 with 4.4.5? I probably thought that the latest xpra has also problems due to Xpra-org/xpra#3939 , however this issue is not related. I will test the latest HTML5 against the latest xpra regarding this issue and let you know. |
No, I probably just misunderstood this bug. xpra-html5/html5/js/lib/rencode.js Line 46 in 6f6295c
xpra-html5/html5/js/lib/rencode.js Line 72 in 6f6295c
FYI: the rencode_legacy_mode is going to be removed soon since xpra servers will no longer be using it.
|
I activated password logging. #259 sends corrupted data to the v4.4.6 server. I tried to understand when First call stack involving rencode
Second call stack involving Utilities
You mean that What I don't understand:
I can send a PR which fixes the |
Your backtrace was from a minimized version of the source, so it's difficult to know which exact line triggered which call. IIRC, Line 2956 in 6f6295c
Calls Utilities.s to ensure that the value is a string, even when receiving data using a legacy packet encoder that only sends bytes . It may be redundant / unhelpful nowadays with rencodeplus .Perhaps the correct fix is to remove these hacks. |
Then v4.4.6 must be using the legacy packet encoder. So the idea is to ensure that This issue is related to websockets. Due to Xpra-org/xpra#3939 I cannot establish a websocket connection to the latest server so I cannot fix this without fixing Xpra-org/xpra#3939. I'll try Xpra-org/xpra#3939 first. |
@goekce I did not perform any tests with authentication enabled. |
@goekce Xpra-org/xpra#3939 is closed as fixed so I don't see how it could be blocking anything. |
this is related to ArchLinux which is unsupported, so I closed the issue before fixing.
Great @oskarbraten ! |
No. AFAIK, the issue was already fixed, you're just running an older version. |
After #259 authentication using the HTML5 client does not work anymore.
If I use
xpra attach wss://[email protected]
authentication is fine but using HTML5 client fails. I could not find a way to print the password string which is sent to PAM.@oskarbraten did you test the PR? If yes: I don't have experience with Javascript however I can try to print the encoded string before and after the PR.
The text was updated successfully, but these errors were encountered: