js-client icon indicating copy to clipboard operation
js-client copied to clipboard

URL parameters should be percent-encoded

Open ehmicky opened this issue 4 years ago • 2 comments

URL parameters should be percent-encoded using encodeURIComponent().

https://github.com/netlify/js-client/blob/b0bf6d41159d936747f16d63d02025709dcf7fc2/src/methods/url.js#L19

This fix should be a major release, since some clients might currently do this percent-encoding themselves. This is the case for example of @netlify/build with the updatePlugin endpoint at https://github.com/netlify/build/issues/2700 (which would need to be fixed).

ehmicky avatar Apr 29 '21 21:04 ehmicky

var hoy = 4; ayer = '4', comp; comp = hoy == ayer; /* comp adquiere el valor true*/ comp = hoy === ayer /* comp adquiere el valor false*/

Pentatool15 avatar Jun 30 '21 21:06 Pentatool15

Los parámetros de URL deben codificarse en porcentaje mediante encodeURIComponent().

https://github.com/netlify/js-client/blob/b0bf6d41159d936747f16d63d02025709dcf7fc2/src/methods/url.js#L19

Esta solución debería ser una versión importante, ya que algunos clientes actualmente pueden realizar esta codificación porcentual ellos mismos. Este es el caso por ejemplo de @netlify/buildla updatePluginpunto final en el netlify / build # 2700 (que tendría que ser fijo).

Ja.tkp

Pentatool15 avatar Jul 01 '21 09:07 Pentatool15