bugGNU Wget - Bugs: bug #62724, Measuring UTF-8 Encoded Filename...

 
 

bug #62724: Measuring UTF-8 Encoded Filename Length comes unexpected result

Submitter:  None
Submitted:  Fri 08 Jul 2022 04:55:54 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Status:  None
Privacy:  Public Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Open Release:  1.17.1
Operating System:  Others (Please Specify) Reproducibility:  Every Time
Fixed Release:  None Planned Release:  None
Regression:  None Work Required:  None
Patch Included:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 08 Jul 2022 04:55:54 PM UTC, original submission:  

hello,

I tested senario on Centos.

when i test with UTF-8 encoded filename, it seemed wget measure wrong filename length.

When Content-Disposition header is set to 'attachment; filename*=UTF-8''%ea%b0%80%eb%82%98%eb%8b%a4%eb%9d%bc%eb%a7%88%eb%b0%94%ec%82%ac%ec%95%84%ec%9e%90%ec%b0%a8%ec%b9%b4%ed%83%80%ed%8c%8c%ed%95%98%ea%b0%80%eb%82%98%eb%8b%a4%eb%9d%bc%eb%a7%88%eb%b0%94%ec%82%ac%ec%95%84%ec%9e%90%ec%b0%a8%ec%b9%b4%ed%83%80%ed%8c%8c%ed%95%98%ea%b0%80%eb%82%98%eb%8b%a4%eb%9d%bc%eb%a7%88%eb%b0%94%ec%82%ac%ec%95%84%ec%9e%90%ec%b0%a8%ec%b9%b4%ed%83%80%ed%8c%8c%ed%95%98%ea%b0%80%eb%82%98%eb%8b%a4%eb%9d%bc%eb%a7%88%eb%b0%94%ec%82%ac%ec%95%84%ec%9e%90%ec%b0%a8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
, the length of filename will be 212 bytes in decoded bytes(%ea => 1byte, %b0 => 1byte...and so on.) and this filename can be expressed in unix.
But 'wget --content-disposition restrict-file-names=unix,nocontrol     
<URL>' produces '가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차카타파하가나다라마바사아자차aaaaaaaaaaaaaa' which is cut. I think if the decoded filename length is under the 255 bytes, it should work. Is there any rules measuring the filename length? Please give some help. thanks.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

No changes have been made to this item

Back to the top

Powered by Savane 3.14-8eb0.
Corresponding source code