Skip to content

Commit

Permalink
missing urlencoding to allow special chars
Browse files Browse the repository at this point in the history
  • Loading branch information
rodolfomiranda committed Apr 11, 2024
1 parent 5c65b95 commit fcfca8c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/keri/app/aiding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ export class Identifier {
* @returns {Promise<any>} A promise to the identifier information
*/
async rename(name: string, newName: string): Promise<any> {
const path = `/identifiers/${name}`;
const path = `/identifiers/${encodeURIComponent(name)}`;
const data = { name: newName };
const method = 'PUT';
const res = await this.client.fetch(path, method, data);
Expand All @@ -142,7 +142,7 @@ export class Identifier {
* @returns {Promise<any>} A promise to the identifier information
*/
async delete(name: string): Promise<any> {
const path = `/identifiers/${name}`;
const path = `/identifiers/${encodeURIComponent(name)}`;
const method = 'DELETE';
await this.client.fetch(path, method, null);
return;
Expand Down Expand Up @@ -308,7 +308,7 @@ export class Identifier {
jsondata[keeper.algo] = keeper.params();

const res = await this.client.fetch(
'/identifiers/' + name + '/events',
`/identifiers/${encodeURIComponent(name)}/events`,
'POST',
jsondata
);
Expand Down Expand Up @@ -407,7 +407,7 @@ export class Identifier {
jsondata[keeper.algo] = keeper.params();

const res = await this.client.fetch(
'/identifiers/' + name + '/events',
`/identifiers/${encodeURIComponent(name)}/events`,
'POST',
jsondata
);
Expand Down Expand Up @@ -444,7 +444,7 @@ export class Identifier {
};

const res = this.client.fetch(
'/identifiers/' + name + '/endroles',
`/identifiers/${encodeURIComponent(name)}/endroles`,
'POST',
jsondata
);
Expand Down Expand Up @@ -484,7 +484,7 @@ export class Identifier {
*/
async members(name: string): Promise<any> {
const res = await this.client.fetch(
'/identifiers/' + name + '/members',
`/identifiers/${encodeURIComponent(name)}/members`,
'GET',
undefined
);
Expand Down

0 comments on commit fcfca8c

Please sign in to comment.