Project

General

Profile

Actions

Defect #566

closed

URI malformed, % in username

Added by Ondřej Kopr almost 7 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Radek Tomiška
Category:
Rest
Target version:
Start date:
07/04/2017
Due date:
% Done:

100%

Estimated time:
Affected versions:
Owner:

Description

While change or create identity with username that contains % in name, get FE error:

URI malformed

Stack from console:

[ERROR] {} [URIError: URI malformed]
URIError: URI malformed
    at decodeURIComponent (<anonymous>)
    at http://localhost:3000/dist/js/app.js:238621:19
    at Array.map (native)
    at Object.matchPattern (http://localhost:3000/dist/js/app.js:238620:34)
    at matchRouteDeep (http://localhost:3000/dist/js/app.js:240914:33)
    at http://localhost:3000/dist/js/app.js:241020:5
    at next (http://localhost:3000/dist/js/app.js:237949:12)
    at Object.loopAsync (http://localhost:3000/dist/js/app.js:237966:3)
    at matchRoutes (http://localhost:3000/dist/js/app.js:241019:15)
    at onChildRoutes (http://localhost:3000/dist/js/app.js:240966:9)

Actions #2

Updated by Ondřej Kopr almost 7 years ago

  • Assignee changed from Radek Tomiška to Ondřej Kopr
Actions #3

Updated by Ondřej Kopr almost 7 years ago

Error get from react-metismenu-router-link.js
line 587

return v && decodeURIComponent(v);

Actions #4

Updated by Radek Tomiška almost 7 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška
Actions #5

Updated by Radek Tomiška almost 7 years ago

This is problem on frontend only, possible solutions:
  • use uuid on frontend identity profile - this is onlz usage of code istead uuid (Codeable interface on BE rest endpoint works fine with any special character)
  • try to add escape special charters on FE - it's added in rest call, but it's maybe to late
Actions #6

Updated by Radek Tomiška almost 7 years ago

  • Status changed from New to Needs feedback
  • Assignee changed from Radek Tomiška to Ondřej Kopr
  • Target version set to Citrine (7.3.0)
  • % Done changed from 0 to 90

I've added appropriate url encoding to identity's username parameter on frontend, now every special character works.

Could you pls do a test and review?

Actions #7

Updated by Ondřej Kopr almost 7 years ago

  • Status changed from Needs feedback to Resolved
  • % Done changed from 90 to 100

I did review.

create user with Test%20%%gmail@.com works,
login as user Test%20%%gmail@.com works.

everything is now OK, thank you for fixing this problem.

Actions #8

Updated by Ondřej Kopr almost 7 years ago

  • Assignee changed from Ondřej Kopr to Radek Tomiška
Actions #9

Updated by Radek Tomiška almost 7 years ago

  • Status changed from Resolved to Closed
Actions #10

Updated by Radek Tomiška about 5 years ago

  • Category changed from 20 to Rest
Actions

Also available in: Atom PDF