rejetto / hfs

HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
GNU General Public License v3.0
2.29k stars 227 forks source link

generate wrong URL list when filename contains "#" #436

Closed ragnaroks closed 10 months ago

ragnaroks commented 10 months ago

BEFORE

To Reproduce Steps to reproduce the behavior:

  1. create a directory in HFS service path
  2. put 2 file with name "file #1.txt" and "file #2.txt"
  3. browser this directory, if click filename direactly, it will download
  4. if try generate URL list, will output like
    http://127.0.0.1:8384/x1/file #1.txt
    http://127.0.0.1:8384/x1/file #2.txt
  5. copy URL and open in new tab, "Not Found"

Describe the bug seems that HFS not escape the "#" symbol or others too

Expected behavior if filename contains "#" then generated URL will invalid

Screenshots not need

Environment (please complete the following information):

Additional context not need

rejetto commented 10 months ago

thanks for reporting! I just noticed that i'm not even attempting encoding, even spaces are left as they are. I cant' remember why it is so, but it seems wrong. Fixed in next release

ragnaroks commented 10 months ago

and '%' symbol need encode too

rejetto commented 10 months ago

sure, no problem

ragnaroks commented 10 months ago

i send you a cup of coffee for thanks your work

ragnaroks commented 10 months ago

oh sorry that i get message "此国家或地区不支持捐赠给此收款人", did you have other payment?

rejetto commented 10 months ago

if the one that failed is github https://github.com/sponsors/rejetto then you can use paypal https://www.paypal.com/donate/?hosted_button_id=HC8MB4GRVU5T2

ragnaroks commented 10 months ago

your paypal receive configure not allow CHINA send money to you by RECEIVE-PAGE, but find your email and send you by merchant tools,have fun

ragnaroks commented 10 months ago

image

if this profile is not you, please email me your paypal register email then i send again

rejetto commented 10 months ago

that's not me, i'm a@rejetto.com on paypal

ragnaroks commented 10 months ago

damn, what a lucky guy...

i send again, have fun

rejetto commented 10 months ago

you sent him money? LOL, i'm sorry :) so, you are saying that the link I gave you is not working for you in China, but you still can send with paypal. That's odd! I will look into that asap and thanks a lot for your donation!

ragnaroks commented 10 months ago

i am both CLIENT and MERCHANT on paypal, i can't send you as client, but i can send anyone as merchant

rejetto commented 10 months ago

should be fixed by this https://github.com/rejetto/hfs/releases/tag/v0.51.0-beta9