DocumentServer icon indicating copy to clipboard operation
DocumentServer copied to clipboard

Not fully urlencoded URL while downloading/printing file

Open vblz opened this issue 4 years ago • 1 comments

Do you want to request a feature or report a bug? Bug

What is the current behavior? If you open a document with the character + in title and try downloading it, the character will be passed not url encoded into the filename parameter. Example: https://host/PATH/cache/files/07204cc9c7a65e73afd50ee2c4dcec40b25c4a9d479a0579b198647fc9763f0d_4419/output.docx/%D0%A2%D0%B5%2B%D1%81%D1%82(v2).docx?md5=7VGyzU_15KonUr-rskJOJw&expires=1636976555&filename=Те+ст(v2).docx

If you use IIS as a reverse proxy in front of Document Server, IIS can't pass through URL including the + character and this request returns error

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.

  1. Open a document with the title "Те+ст(v2)"
  2. Download the file from the editor
  3. Check the url of downloading file Result: Part of the URL url encoded properly, but the filename parameter is not

What is the expected behavior? According to RFC 3986 2.2 the + character is one of Reserved Characters, it is an error using it in URL without encoding it using URL Encode algorithm

Did this work in previous versions of DocumentServer? At least since 6.3

DocumentServer version: 6.4.2

Operating System: Linux

Browser version: FireFox 93.0

vblz avatar Nov 16 '21 05:11 vblz

@igwyd Please, take a look as soon as you got free time

This seems rather complicated issue, not sure we've ever checked IIS as reverse proxy

ShockwaveNN avatar Nov 16 '21 07:11 ShockwaveNN