mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
fix: Update generated keys in ExpiringAdapterFactory to prevent overlap
If the keys were not encoded there could be an issue where there were 2 similar keys `grant/123` and `Grant/123`.
This commit is contained in:
parent
7684198b53
commit
2914fd7d60
@ -19,15 +19,15 @@ export class ExpiringAdapter implements Adapter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private grantKeyFor(id: string): string {
|
private grantKeyFor(id: string): string {
|
||||||
return `grant/${encodeURIComponent(id)}`;
|
return `grants/${encodeURIComponent(id)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private userCodeKeyFor(userCode: string): string {
|
private userCodeKeyFor(userCode: string): string {
|
||||||
return `user_code/${encodeURIComponent(userCode)}`;
|
return `user_codes/${encodeURIComponent(userCode)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private uidKeyFor(uid: string): string {
|
private uidKeyFor(uid: string): string {
|
||||||
return `uid/${encodeURIComponent(uid)}`;
|
return `uids/${encodeURIComponent(uid)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
private keyFor(id: string): string {
|
private keyFor(id: string): string {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user