Commit Graph

14 Commits (ba4df55d6e84c3a47069394480ad8b7cf708d71b)

Author SHA1 Message Date
Andy Hsu 57bac9e0d2 fix: some missing regexp lib modified 2024-01-01 18:44:59 +08:00
BaiYi 112363031a
feat: add fine-grained control for link signing (#3924)
* Determine whether the URL requires Sign

* Add File and Mem based KV

NOT TESTED: TokenKV Function

* Change Token KV func to common func.

Add File based KV func

* Remove KV, Remove Token

I found that the original Sign function is enough to complete the link signature, and only need to add simple configuration items to meet the requirements.

* Add IsStorageSigned func to judge if Signing is enabled in the storage settings.

It should be working now.

* Add a SIGN button to the management panel.

* Add enable_sign to the basic storage struct.

Can enable sign for every driver now.

Bug: When sign enabled, in download page, Copy link doesn't contain a sign.

(Not done yet)

* Fix a bug from commit 8f6c25f.

Response of fsread function does not contain sign.

* Optimize code and follow advices.

- Add back public/dist/README.md

- Enable sign when DownProxyUrl is enabled

- Merge needSign() to isEncrypt() in fsread.go

* simplify code

---------

Co-authored-by: Andy Hsu <i@nn.ci>
2023-03-24 22:44:33 +08:00
Andy Hsu d9795ff22f feat(alias): support proxy and direct together 2023-03-14 13:46:27 +08:00
Andy Hsu 43de823058 fix: path `IsApply` check (close #3784) 2023-03-09 21:03:56 +08:00
Andy Hsu 12a095a1d6 fix: slice bounds out of range on `CanAccess` check 2023-03-05 15:29:53 +08:00
Andy Hsu ca9e739465 fix: hide apply to sub path without enable (close #3661) 2023-02-28 18:43:52 +08:00
Wuxuan 530e74c70b
fix: avoid regular expression match current directory (#3078)
* fix: avoid regular expression match current directory

* fix: optimize and regexp exclude slash

Co-authored-by: wuxuan <refused@wuxuan.eu.org>
2023-01-17 21:54:25 +08:00
浅秋枫影 ae791c8634
fix: hide check in `canAccess` (#2556)
修复 meta.Password 和 meta.Hide 都为空的情况下,会导致无权限访问
2022-12-02 17:44:29 +08:00
Noah Hsu 4980b71ba3 fix: add hide check to `canAccess` (close #2532) 2022-11-30 22:01:33 +08:00
Noah Hsu 85e1350af8 fix: check password while upload (close #2444) 2022-11-22 16:14:01 +08:00
Noah Hsu b76060570e refactor: init v3 2022-06-06 16:28:37 +08:00
微凉 ef5cad1bf0 🎇 Pagination #257 2022-01-04 21:21:27 +08:00
微凉 190c8001a5 🚧 support proxy url 2021-12-08 10:33:26 +08:00
微凉 03580fd76c 🎨 Improve the code structure 2021-12-07 15:56:43 +08:00