cloudinary / cloudinary/cloudinary_gem

Transformation params not properly URL escaped

Abierto
#540 3 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Ruby
Estrellas
420
Forks
285
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

## 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

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comience en Cloudinary::Utils.cloudinary_url y reproduzca el problema con los parámetros de transformación mostrados, especialmente el valor de color que contiene unas comillas dobles. Trace cómo se formula la URL y verifique que la URL resultante escape correctamente las comillas y sea válida.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
ruby
Área
backend
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.