Estaba leyendo "The Tangled Web" (un libro que estoy disfrutando mucho) y tengo una duda en el siguiente extracto extraído de él: -
When Handling User-Controlled Filenames in Content-Disposition Headers
If you do not need non-Latin characters: Strip or substitute any characters except for alpha- numerics, “.”, “-”, and “_”. To protect your users against potentially harmful or deceptive filenames, you may also want to confirm that at least the first character is alphanumeric and substitute all but the rightmost period with something else (e.g., an underscore).
Keep in mind that allowing quotes, semicolons, backslashes, and control characters (0x00–0x1F) will introduce vulnerabilities.
If you need non-Latin names: You must use RFC 2047, RFC 2231, or URL-style percent encoding in a browser-dependent manner. Make sure to filter out control characters (0x00–0x1F) and escape any semicolons, backslashes, and quotes.
- ¿Cuáles son los caracteres que deben codificarse en porcentaje de URL?
- Al "escapar con punto y coma, barras diagonales inversas y comillas", ¿se escapan utilizando barras diagonales inversas?