Fully re-enable client-side signature verification
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 41s
Details
This commit is contained in:
parent
25e515e0bb
commit
53e0745532
|
@ -5,7 +5,7 @@ import { recoverPersonalSignature } from '@metamask/eth-sig-util';
|
|||
import objectHash from 'object-hash/dist/object_hash';
|
||||
|
||||
// Make Buffer available to recoverPersonalSignature
|
||||
// window.Buffer = Buffer;
|
||||
window.Buffer = Buffer;
|
||||
|
||||
class Post {
|
||||
constructor({
|
||||
|
@ -26,12 +26,8 @@ class Post {
|
|||
throw new Error('Hash mismatch');
|
||||
}
|
||||
// Verify signature
|
||||
let recovered;
|
||||
try {
|
||||
recovered = recoverPersonalSignature({ data: content, signature });
|
||||
} catch (e) {
|
||||
throw new Error('Signature error', e);
|
||||
}
|
||||
const recovered = recoverPersonalSignature({ data: content, signature });
|
||||
|
||||
if (recovered !== author) {
|
||||
throw new Error('Author mismatch');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue