Skip to content

Commit

Permalink
fix(ui): Fix greediness in regex for auth token replacement (#5746)
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Ruoss <michael.ruoss@ufirstgroup.com>
  • Loading branch information
Michael Ruoss authored Apr 23, 2021
1 parent 284adfe commit 500d933
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/src/app/userinfo/components/cli-help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const CliHelp = () => {
.split(';')
.map(x => x.trim())
.find(x => x.startsWith('authorization=')) || ''
).replace(/^authorization="?(.*)"?$/, '$1');
).replace(/^authorization="?(.*?)"?$/, '$1');

const text = `export ARGO_SERVER='${document.location.hostname}:${document.location.port || (argoSecure ? 443 : 80)}'
export ARGO_HTTP1=true
Expand Down

0 comments on commit 500d933

Please sign in to comment.