@goodandready/dsh-subscriptions 0.6.89 → 0.6.90
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/lib/routes/oauth.js +6 -0
- package/package.json +1 -1
package/lib/routes/oauth.js
CHANGED
|
@@ -224,6 +224,12 @@ export function registerOauthRoutes(ctx, state) {
|
|
|
224
224
|
writeJson(res, 405, { ok: false, error: { code: 'method', message: 'GET only' } })
|
|
225
225
|
return
|
|
226
226
|
}
|
|
227
|
+
const secFetchMode = String((req.headers && req.headers['sec-fetch-mode']) || '').toLowerCase()
|
|
228
|
+
const isNavigation = secFetchMode === 'navigate'
|
|
229
|
+
if (!isNavigation && !isTrustedSettingsRequest(req, ctx)) {
|
|
230
|
+
writeHtml(res, 403, '<!doctype html><meta charset="utf-8"><title>Subscriptions</title><p>Forbidden: untrusted OAuth callback request.</p>')
|
|
231
|
+
return
|
|
232
|
+
}
|
|
227
233
|
const q = queryOf(req)
|
|
228
234
|
const code = q.get('code') || ''
|
|
229
235
|
const state = q.get('state') || ''
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@goodandready/dsh-subscriptions",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.90",
|
|
4
4
|
"description": "Use ChatGPT Codex, Claude, Grok, Antigravity, Kimi, GLM, Cursor, Kiro, Copilot, Qwen, ERNIE, Spark, JetBrains, Perplexity, Replit, and Cody subscriptions as DeepSeek Harness LLM providers via OAuth.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|