Compare commits

..

No commits in common. "71cb7738dee75c74a64e870341d7b8b27275ee01" and "ae5c3bb281e126d62c5fb34ee922c121fc1507f2" have entirely different histories.

3 changed files with 4 additions and 4 deletions

View file

@ -152,7 +152,7 @@ export class SignatureValidator {
new TextEncoder().encode(body), new TextEncoder().encode(body),
); );
const expectedSignedString = `${method.toLowerCase()} ${encodeURI(url.pathname)} ${timestamp.getTime() / 1000} ${arrayBufferToBase64(digest)}`; const expectedSignedString = `${method.toLowerCase()} ${encodeURIComponent(url.pathname)} ${timestamp.getTime() / 1000} ${arrayBufferToBase64(digest)}`;
// Check if signed string is valid // Check if signed string is valid
const isValid = await crypto.subtle.verify( const isValid = await crypto.subtle.verify(
@ -305,7 +305,7 @@ export class SignatureConstructor {
new TextEncoder().encode(body ?? ""), new TextEncoder().encode(body ?? ""),
); );
const signedString = `${requestOrMethod.toLowerCase()} ${encodeURI( const signedString = `${requestOrMethod.toLowerCase()} ${encodeURIComponent(
url.pathname, url.pathname,
)} ${finalTimestamp.getTime() / 1000} ${arrayBufferToBase64(digest)}`; )} ${finalTimestamp.getTime() / 1000} ${arrayBufferToBase64(digest)}`;

View file

@ -1,7 +1,7 @@
{ {
"$schema": "https://jsr.io/schema/config-file.v1.json", "$schema": "https://jsr.io/schema/config-file.v1.json",
"name": "@versia/federation", "name": "@versia/federation",
"version": "0.2.1", "version": "0.2.0",
"exports": { "exports": {
".": "./index.ts", ".": "./index.ts",
"./types": "./types.ts", "./types": "./types.ts",

View file

@ -1,7 +1,7 @@
{ {
"name": "@versia/federation", "name": "@versia/federation",
"displayName": "Versia Federation", "displayName": "Versia Federation",
"version": "0.2.1", "version": "0.2.0",
"author": { "author": {
"email": "jesse.wierzbinski@lysand.org", "email": "jesse.wierzbinski@lysand.org",
"name": "Jesse Wierzbinski (CPlusPatch)", "name": "Jesse Wierzbinski (CPlusPatch)",