When strict transformations are enabled, token-based access fails with a 401
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Anfängerfreundlichkeit
- 45/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, nodejs
Rechercherichtung
Beginne in lib/utils/index.js etwa bei Zeile 880 und reproduziere den Aufruf von cloudinary.url mit aktivierten Optionen auth_token und sign_url. Verfolge, warum die generierte URL das Token enthält, aber den Pfadparameter für die Signatur nicht enthält. Als erledigt gilt die Aufgabe, wenn die resultierende URL die erwartete Signatur enthält und mit strict transformations funktioniert.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
Describe the bug in a sentence or two.
When I set both the auth_token and sign_url parameters on cloudinary.url, the resulting URL is given a token but is not signed. Thus, if I have strict transformations enabled, I still get a 401 from the resulting URL.
Issue Type (Can be multiple)
[ ] Build - Can’t install or import the SDK
[ ] Babel - Babel errors or cross browser issues
[ ] Performance - Performance issues
[x] Behaviour - Functions aren’t working as expected (Such as generate URL)
[ ] Documentation - Inconsistency between the docs and behaviour
[ ] Incorrect Types - For typescript users who are having problems with our d.ts files
[ ] Other (Specify)
Steps to reproduce
Any basic call to cloudinary.url, e.g.:
cloudinary.url('my_image', {
type: 'upload',
auth_token: { key: '<encryption-key>', duration: 300 },
sign_url: true,
})
This gives me:
https://res.cloudinary.com/<env>/image/upload/my_image?__cld_token__=exp=1234~hmac=<snip>&_a=BAMCkGUm0
The URL is missing the signature path param, so if I have strict transformations, the URL doesn't work.
Seems like this conditional is preventing it: https://github.com/cloudinary/cloudinary_npm/blob/d12a63fefdd0209ed71c3a641a9d3166126c09d8/lib/utils/index.js#L880
I'm not sure if there's a different reason for it, but as a new user to the platform, my gut feeling says this part might need to change.
Versions and Libraries (fill in the version numbers)
Cloudinary_NPM SDK version 2.5.1
Node - 18.13.0
NPM - 0.0.0
PNPM - 9.4.0
- Vorherrschende Sprache
- JavaScript
- Sterne
- 672
- Forks
- 318
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Kein Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudinary/cloudinary_npm
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
cloudinary/cloudinary_npm#746 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 30/100
cloudinary/cloudinary_npm#739 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 58/100
cloudinary/cloudinary_npm#734 ·
-
How to handle API KeysOffen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
cloudinary/cloudinary_npm#713 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 45/100
cloudinary/cloudinary_npm#712 · 1 Kommentar ·
Alle Issues in cloudinary/cloudinary_npm
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
-
discovery:other factory-active task-identify-harness-labels-done task-identify-issue-type-done
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
vercel/ai#25068 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs-triage typo
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
llm-d-incubation/llm-d-scaling-manager#122 ·
Maintainer antworten meist innerhalb von 1 Tag
-
create-strapi-app doesn't await writing license.txt, so a failed write skips its error handlingOffenflag: invalid template issue: bug severity: low source: cli status: pending reproduction version: 5
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
strapi/strapi#28637 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 2 Tagen
-
meta
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
matrix-org/matrix.org#3774 ·
Maintainer antworten meist innerhalb von 1 Tag