Fix base64 encoding to keep padding for Go URLEncoding (v0.39.3)
Some checks failed
Go / build-and-release (push) Has been cancelled
Some checks failed
Go / build-and-release (push) Has been cancelled
- Remove padding stripping from URL-safe base64 conversion - Go's base64.URLEncoding expects padding characters - Fix applied to LogView.svelte, BlossomView.svelte, and api.js Files modified: - app/web/src/LogView.svelte: Keep padding in auth header - app/web/src/BlossomView.svelte: Keep padding in auth header - app/web/src/api.js: Keep padding in auth header - pkg/version/version: Bump to v0.39.3 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2
app/web/dist/bundle.js
vendored
2
app/web/dist/bundle.js
vendored
File diff suppressed because one or more lines are too long
2
app/web/dist/bundle.js.map
vendored
2
app/web/dist/bundle.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -76,8 +76,8 @@
|
||||
};
|
||||
|
||||
const signedEvent = await signer.signEvent(authEvent);
|
||||
// Use URL-safe base64 encoding
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
// Use URL-safe base64 encoding (replace + with -, / with _)
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_');
|
||||
} catch (err) {
|
||||
console.error("Error creating Blossom auth:", err);
|
||||
return null;
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
};
|
||||
|
||||
const signedEvent = await userSigner.signEvent(authEvent);
|
||||
// Use URL-safe base64 encoding (replace + with -, / with _, remove padding)
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
// Use URL-safe base64 encoding (replace + with -, / with _)
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_');
|
||||
} catch (err) {
|
||||
console.error("Error creating auth header:", err);
|
||||
return null;
|
||||
|
||||
@@ -30,8 +30,8 @@ export async function createNIP98Auth(signer, pubkey, method, url) {
|
||||
|
||||
// Sign using the signer
|
||||
const signedEvent = await signer.signEvent(authEvent);
|
||||
// Use URL-safe base64 encoding
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
|
||||
// Use URL-safe base64 encoding (replace + with -, / with _)
|
||||
return btoa(JSON.stringify(signedEvent)).replace(/\+/g, '-').replace(/\//g, '_');
|
||||
} catch (error) {
|
||||
console.error("Error creating NIP-98 auth:", error);
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user