cloudinary / cloudinary/cloudinary_gem

Transformation params not properly URL escaped

オープン
#540 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Ruby
スター
420
フォーク
285
PR マージ指標
30日以内にマージされた PR はありません

説明

## Bug report for Cloudinary Ruby SDK
Before proceeding, please update to latest version and test if the issue persists - DONE

## Describe the bug in a sentence or two.
If the parameters passed to transformation contain a double quote, they are not properly escaped when formulating cloudinary URL, causing invalid URL to be generated

## Issue Type (Can be multiple)
- [ ] Build - Cannot install or import the SDK
- [ ] Performance - Performance issues
- [x] Behaviour - Functions are not working as expected (such as generate URL)
- [ ] Documentation - Inconsistency between the docs and behaviour
- [ ] Other (Specify)

## Steps to reproduce
Run
`Cloudinary::Utils.cloudinary_url(VIDEO_ID_HERE,{ resource_type: "video", transformation: [{color: '"abc', overlay: { font_family: "Times", font_size: 12, font_weight: "bold", text: "..." }}])`

note the '"abc' for the color

## Error screenshots or Stack Trace (if applicable)
Screenshot 2024-03-28 at 19 29 07

## Operating System
- [ ] Linux
- [ ] Windows
- [x] macOS
- [ ] All

## Environment and Libraries (fill in the version numbers)
- Cloudinary Ruby SDK version - cloudinary (1.29.0)
- Ruby Version - ruby 3.3.0
- Rails Version - Rails 7.1.3.2

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Cloudinary::Utils.cloudinary_url から開始し、示されている変換パラメータ、特に二重引用符を含む色の値を使って問題を再現します。URL がどのように組み立てられるかを追跡し、結果の URL が引用符を適切にエスケープしており、有効であることを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby
領域
backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。