Page MenuHomePhabricator

Correct user name character encoding
Open, Needs TriagePublicBUG REPORT

Description

It looks like some character encoding is going wrong when presenting the users displayname.

In the image below the name should be André.

image.png (62×328 px, 5 KB)

Event Timeline

Lokal_Profil changed the subtype of this task from "Task" to "Bug Report".Feb 23 2021, 12:36 PM

Unclear to me exactly where this happens but a likely culprit is that the Oauth provided data isn't encoded as expected.

Sir,can you please assign this task to me?

Can someone please help me how can i get the code base?I want to contribute

Soda subscribed.

Sir,can you please assign this task to me?

Feel free to assign yourself the task @DishaJain01 there are no restriction wrt to assigning yourself tasks as long as nobody is working on it/is assigned.

With respect to getting started, I would suggest checking out our repository at https://gerrit.wikimedia.org/r/admin/repos/labs/tools/VideoCutTool,general and trying to setup the VideoCutTool development environment based on the instructions here https://gerrit.wikimedia.org/r/plugins/gitiles/labs/tools/VideoCutTool/+/refs/heads/master/README.md :)

@DishaJain01: Please provide context instead of posting only an image. :) Does that mean you cannot reproduce? Does that mean that you fixed something locally?

Let me clear if i am wrong,what i need to do is when i enter Andre it needs to display same name instead of displaying the name with some special characters.Right?

The user name should be shown correctly. When this task was reported that was not the case (see screenshot in the task description).

Please check my screenshot once,in my screenshot name is properly written.

@DishaJain01: Please check my comment T275491#8591360 where I asked after which steps that you did or did not perform that screenshot was taken.

In other words: If you cannot reproduce the problem anymore, please explicitly write that you cannot reproduce the problem anymore, to avoid any ambiguity. Thanks a lot!

@Aklapper Can you please tell me what will be the output, according to you? Can you please explain to me, where I am wrong? So that I can work better on the same.

Hi, I don't know if you are wrong, as you have not described yet what you have tried (or not).

As a start: 1) Could you reproduce the bug? 2) What exactly have you tried to reproduce the bug? As text. I don't know what these screenshots are supposed to show...

Hi, please thoroughly read my previous comment. Posting screenshots without any text comment or explanation is not a good use of time, and I still do not know if you could initially reproduce the bug or not (without any changes). If you made some code changes please post them as a code diff in Gerrit and not as an image, and please clearly state in a comment if you could reproduce the problem, what/how you tested, and if your proposed changes fix the problem. Thanks a lot! :)

Here what I did is, i used JSON.parse method to parse my data which is in the form of String into javascript object.A parse method ensures that the data is valid JSON which again in turn ensures that the malicious code can not be injected.

Sorry for the inconvenience, I will make sure along with screenshot my approach will also be there.

I personally don't mind what the code change does. :) My questions were: 1) Did you initially succeed to reproduce the bug, before making any code changes? 2) If you managed to reproduce the bug, and then made some code changes, did your testing after making some code changes fix the bug?

Screenshot 2023-02-07 at 7.08.35 PM.png (1×2 px, 550 KB)

@DishaJain01 I don't think this should be the solution, especially since you are hardcoding the username values, can you try testing with the OAuth integration enabled ?

@DishaJain01: Hi! Could you maybe share an update? Do you still plan to work on this task, or do you need any help? Thanks!

@Aklapper Hi, I am trying to work on this issue right now. It seems like user.username in Authentication.jsx is not properly encoded, so non-latin characters cannot be displayed correctly. Is user.username encoded using UTF-8, ISO-8859-1, or something else?

Removing assignee due to no reply. Sorry, I don't know the answer to the encoding question.