Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@upstash/qstash

Package Overview
Dependencies
Maintainers
5
Versions
210
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@upstash/qstash - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

5

esm/consumer.js
import * as dntShim from "./_dnt.shims.js";
import * as base64url from "./deps/deno.land/std@0.144.0/encoding/base64url.js";
import * as base64 from "./deps/deno.land/std@0.144.0/encoding/base64.js";
export class SignatureError extends Error {

@@ -77,4 +76,4 @@ constructor(message) {

const bodyHash = await dntShim.crypto.subtle.digest("SHA-256", new TextEncoder().encode(req.body));
if (p.body != base64.encode(bodyHash)) {
throw new SignatureError(`body hash does not match, want: ${p.body}, got: ${base64.encode(bodyHash)}`);
if (p.body != base64url.encode(bodyHash)) {
throw new SignatureError(`body hash does not match, want: ${p.body}, got: ${base64url.encode(bodyHash)}`);
}

@@ -81,0 +80,0 @@ return true;

2

package.json

@@ -6,3 +6,3 @@ {

"name": "@upstash/qstash",
"version": "v0.0.8",
"version": "v0.0.9",
"description": "Official Deno/Typescript client for qStash",

@@ -9,0 +9,0 @@ "repository": {

@@ -29,3 +29,2 @@ "use strict";

const base64url = __importStar(require("./deps/deno.land/std@0.144.0/encoding/base64url.js"));
const base64 = __importStar(require("./deps/deno.land/std@0.144.0/encoding/base64.js"));
class SignatureError extends Error {

@@ -105,4 +104,4 @@ constructor(message) {

const bodyHash = await dntShim.crypto.subtle.digest("SHA-256", new TextEncoder().encode(req.body));
if (p.body != base64.encode(bodyHash)) {
throw new SignatureError(`body hash does not match, want: ${p.body}, got: ${base64.encode(bodyHash)}`);
if (p.body != base64url.encode(bodyHash)) {
throw new SignatureError(`body hash does not match, want: ${p.body}, got: ${base64url.encode(bodyHash)}`);
}

@@ -109,0 +108,0 @@ return true;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc