@atproto/xrpc-server 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atproto/xrpc-server",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "license": "MIT",
5
5
  "description": "atproto HTTP API (XRPC) server library",
6
6
  "keywords": [
@@ -24,7 +24,7 @@
24
24
  "ws": "^8.12.0",
25
25
  "zod": "^3.21.4",
26
26
  "@atproto/common": "^0.3.3",
27
- "@atproto/crypto": "^0.2.3",
27
+ "@atproto/crypto": "^0.3.0",
28
28
  "@atproto/lexicon": "^0.3.0"
29
29
  },
30
30
  "devDependencies": {
@@ -36,7 +36,7 @@
36
36
  "jose": "^4.15.4",
37
37
  "key-encoder": "^2.0.3",
38
38
  "multiformats": "^9.9.0",
39
- "@atproto/crypto": "^0.2.3",
39
+ "@atproto/crypto": "^0.3.0",
40
40
  "@atproto/xrpc": "^0.4.0"
41
41
  },
42
42
  "scripts": {
package/src/auth.ts CHANGED
@@ -71,7 +71,7 @@ export const verifyJwt = async (
71
71
  const sigBytes = ui8.fromString(sig, 'base64url')
72
72
  const verifySignatureWithKey = (key: string) => {
73
73
  return crypto.verifySignature(key, msgBytes, sigBytes, {
74
- lowS: false,
74
+ allowMalleableSig: true,
75
75
  })
76
76
  }
77
77
 
package/src/util.ts CHANGED
@@ -60,7 +60,7 @@ export function decodeQueryParam(
60
60
  if (type === 'float') {
61
61
  return Number(String(value))
62
62
  } else if (type === 'integer') {
63
- return Number(String(value)) | 0
63
+ return parseInt(String(value), 10) || 0
64
64
  } else if (type === 'boolean') {
65
65
  return value === 'true'
66
66
  }