Bug caused by user name non alpha chars

Sort:
Tricky_Dicky

I believe the the colon & close parentheses combination are causing an issue for API.

Web site profile page is OK even though I can't show it properly here as it automatically displays a smiley.

https://www.chess.com/member/jghappy.png

https://api.chess.com/pub/player/jg:)

Tricky_Dicky

Can't get the links in the post to work

User is @JG: )

https://www.chess.com/member/jg:)

 

Tricky_Dicky

It would be nice to type in a literal string without the clever(?) system (mis-) interpreting what I was trying to impart.

stephen_33

"Web site profile page is OK even though I can't show it properly here as it automatically displays a smiley"

But how did you get a working url or link to that member's profile in the first place?

Tricky_Dicky

Thanks Stephen. That helps.

Even so the link is incorrect as it has omitted the final chars, ":" & ")" from the URL

stephen_33
Tricky_Dicky wrote:

Thanks Stephen. That helps.

Even so the link is incorrect as it has omitted the final chars, ":" & ")" from the URL

I misunderstood your problem at first after reading only your first post - when I read the second I realised you're not having trouble posting the url, the problem is in getting it to work as a link. Interesting conundrum!

* I edited my post above so could you explain how you found it in the first place - might give a clue as to how to work around this?

Tricky_Dicky

Correct Stephen

A valid Web page but the API tries to return user @jg  , ignoring the final two chars.

In this case there is no user but potentially it could return data for a different member.

Tricky_Dicky

It seems V3 links are now broken as well

Test @tricky_dicky

Tricky_Dicky

No

error 404 missing page

but if member jg was valid it would return correctly

LegoPirateSenior

Hmm. Trying a workaround: @jg:)

Looks like it worked. The trick is to encode non-alphanumerics:

https://chess.com/member/jg%3A%29

Does not work, though, if the 'text to display' is changed to show the characters explicitly; the URL gets corrupted when saving:

https://www.chess.com/member/jg:)

stephen_33

Definitely a site-specific issue because I can create a link in a test page in my browser & it locates the member's profile page without a problem.

Of course symbols such as '<' & '>' (HTML tags) can also cause problems when we try to insert them in topic titles but then we have escape sequences &lt; & &gt;  Trouble is, I don't think such escapes exist for the colon or ')' symbol?

BTW, pasting in a valid link from another web page doesn't work either! The ':',')' is still treated as if it's an emoji

Tricky_Dicky

I am definitely NOT happy.png

stephen_33

This is interesting - linking from a test page in my browser, this is what is returned for the endpoint...

..
Note the correct URL details there!

LegoPirateSenior

Trying another encoding:

https://chess.com/member/jg&#58;&#41;

https://api.chess.com/pub/player/jg&#58;&#41;

Nope, that one is completely hosed.

stephen_33

It would be reassuring if we could dismiss this as one of those old anomalies from the time of V1 but the account was opened just a couple of months ago  sad.png

LegoPirateSenior
LegoPirateSenior wrote:

Hmm. Trying a workaround: @jg:)

Looks like it worked. The trick is to encode non-alphanumerics:

https://chess.com/member/jg%3A%29

Does not work, though, if the 'text to display' is changed to show the characters explicitly; the URL gets corrupted when saving

 

The API does not work with the above, though: https://api.chess.com/pub/player/jg%3A%29 leads to a blank page.

stephen_33

Examining the web source code for the member's profilepage reveals this URL in links ...

https://www.chess.com/member/jg:%29

For other functions, the username is encoded in this form: jg%3A%29

But I can't get any combination of those to work. It appears to be entirely the way the posting editor is designed & there's no way we 'mere mortals' seem able to get around it.

This is for the developers to fix I think?

* Of course that doesn't explain what I found when I tried to access the endpoint externally!? (my post #13)

Tricky_Dicky

That link works for the web page Stephen, but the API still returns Null.

Concur this needs to be resolved by developers.

I also thought that the use of certain non alphas was being restricted in V3 when creating user names.

stephen_33

Am I right when I say HTTP Error 410 is an indication of an illegal or prohibited URL, rather than one that merely can't be found?

Tricky_Dicky

This is what the spec says:

410 = we know for certain that no data will ever be available at the URL you requested; your client should not request this URL again