1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-20 07:46:09 +00:00
Commit Graph

139 Commits

Author SHA1 Message Date
feiniks
69932ee8ae
Get notification server url from env (#752)
Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-04-08 11:51:11 +08:00
feiniks
05dd35b4c9
Notify repo size change to redis (#750)
Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-04-02 17:11:24 +08:00
feiniks
27fc5b3197
Check if env is empty string (#748)
* Check if env is empty string

* Fix ci error

* Check if env is empty string

* Fix security issue for jwt

---------

Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-04-01 18:22:25 +08:00
feiniks
490f8d431c
Add metrics (#747)
* Add metrics

* Add obj_cache in session

---------

Co-authored-by: Heran Yang <heran.yang@seafile.com>
2025-03-31 16:46:24 +08:00
feiniks
7753e8e02a Return error message when failed to check file access (#737)
* Return error message when failed to check file access

* Update python to 3.12.9

* Update ci python

* Set error_msg to error_str

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-03-15 10:27:20 +08:00
feiniks
0aa399df50
Upgrade pkg version of ristretto (#740)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-03-03 12:39:35 +08:00
feiniks
d5fa18f120
Adjust size of max_download_dir_size and max_upload_size (#739)
* Adjust size of max_download_dir_size and max_upload_size

* Update ci python

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-02-26 11:47:08 +08:00
feiniks
4181851fd0
Set fs cache limit to 4G by default (#735)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-01-22 16:08:54 +08:00
feiniks
29829b5dca
Check if repo_id is valid and set repo_id to VRepoInfo (#733)
* Check if repo_id is valid and set repo_id to VRepoInfo

* Don't retain when traverse base commit

* Skip check blocks when verify base commit

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2025-01-13 17:51:59 +08:00
feiniks
e2d771852f
Fix skip cache error (#732)
* Fix skip cache error

* Delete token cache when failed to get email

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-30 17:32:41 +08:00
feiniks
ee9ad5ef39
Return 409 when gc conflict (#731)
* Return 409 when gc conflict

* Go return 409 when gc conflict

* Return gc conflict when sync repo

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-30 15:03:54 +08:00
feiniks
de62852244
Only use tmpfiles dir for blocks (#730)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-27 16:58:27 +08:00
feiniks
c11e8ccbe9
Send events use json format (#726)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-13 11:01:24 +08:00
feiniks
d04c324b24
Go fileserver support set db charset (#724)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-09 18:31:55 +08:00
feiniks
2ab66f0f93
Add view for video and image (#723)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-09 16:55:45 +08:00
feiniks
e8c0e81b57
Add op to download or view file (#722)
* Add op to download or view file

* Use download-link op and statistic view

* Go add statictic view

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-12-05 15:08:25 +08:00
feiniks
aaa7819c34
Use post and add ip addr and user agent (#719)
* Use post and add ip addr and user agent

* Go add ip addr and user agent

* Adjust gc unit test

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-25 15:59:24 +08:00
feiniks
516eac3304
Output error and warning log (#717)
* Output error and warning log

* Adjust log level

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-23 17:33:09 +08:00
feiniks
1ceeeb2ad3
Get gc id before index blocks (#718)
* Get gc id before index blocks

* Add test gc online

* Add test gc online

* Adjust time of run gc

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-21 18:16:58 +08:00
杨赫然
2f68e9d79a Unnecessary use of fmt.Sprintf 2024-11-20 16:31:19 +08:00
feiniks
d727249a08 Check if file or dir is .. (#711)
* Check if file or dir is ..

* Diff and check name is ..

* Go diff and check name is ..

* Check if ignore new name or name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-20 16:21:51 +08:00
feiniks
665d0083bd
Add verify blocks after sync (#715)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-18 11:34:38 +08:00
feiniks
2cf6b99f40
Use QueryEscape to encode url path (#716)
* Use QueryEscape to encode url path

* Encode url path

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-14 14:10:02 +08:00
feiniks
ed6a292061
Read database config from seafile.conf and env (#713)
* Read database config from seafile.conf and env

* Go read database config from seafile.conf and env

* Delete ccnet.conf

* Don't need ccnet_db_name config

* Add ccnet db name env

* Delete unix_socket and don't return error when failed to read from seafile.conf

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-05 17:42:24 +08:00
feiniks
fdd3bc8f52
Redirect STDERR to error log (#709)
* Redirect STDERR to error log

* Add dup2.go

* Redirect error log to log file

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-29 10:57:03 +08:00
feiniks
abe4537648
Format notification server log and redirect stderr to log (#707)
* Format notification server log and redirect stderr to log

* Set http server error log

* Delete unused file

* Modify pkg name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-26 16:16:35 +08:00
feiniks
5899f110b9
Add online gc (#706)
* Add online gc core

* Add check gc when update repo

* Go add check gc when update repo

* Add gc unit test

* Support set pwd_hash for gc and fsck

* Optimize to check if block exists

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-24 18:34:16 +08:00
feiniks
6af96fe1d2
Log format (#704)
* Format c log

* Format go log

* Add SEAFILE_LOG_TO_STDOUT env

* Modify parameters name

* Set stdout to output

* Add app name and print error log

* Disable daemon mode when SEAFILE_LOG_TO_STDOUT is true

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-24 10:46:41 +08:00
feiniks
1afed5d770
Support archive files with same name (#705)
* Support archive files with same name

* Go support archive files with same name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-27 17:20:04 +08:00
feiniks
4adceee73d
Escape filePath before calling check file access (#703)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-20 11:26:41 +08:00
feiniks
6649fada8c
Parse file path from url (#702)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-19 16:59:35 +08:00
feiniks
61126d108c
Add json exp (#699)
* Add json exp

* Add json exp and add gen jwt token

* Gen seahub and notif jwt token

* Add exp for gen jwt token

* Delete gen_jwt_token API

* Delete set exp to 72 hour

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-18 17:59:24 +08:00
feiniks
f27ab0847b
Return error message when query share link info (#698)
* Return rsp content when query share link info

* Add parse error message

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-13 18:33:41 +08:00
feiniks
c80bf17efb
Add batch del files RPC (#694)
* Add batch del files RPC

* Add pack multi-level files

* Go add pack multi-level files

* Use change set to batch del files

* Improve args

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-13 14:58:45 +08:00
feiniks
b2bde11d89
Add download file API (#696)
* Add download file API

* Go add download file API

* Set http header and return http error

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-12 11:02:41 +08:00
feiniks
f0c95b4e77
Use JWT_PRIVATE_KEY (#697)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-10 15:43:25 +08:00
feiniks
597f4bbfa6
Read site_root from env (#692)
* Read site_root from env

* Go read site_root from env and match slash

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-06 17:17:06 +08:00
feiniks
d01c46e2f9
Add cookie to check share link access (#691)
* Add cookie to check share link access

* Modify user agent and add timeout

* Add filename to attachment

* Go set filename to attach

* C set filename to attachment

* Adjust position of check priviate key

* Set Content-Type and User-Agent

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-06 11:40:42 +08:00
feiniks
f3f818881f
Add read JWT_PRIVATE_KEY (#690)
* Add read JWT_PRIVATE_KEY

* Go add read JWT_PRIVATE_KEY

* Add seahub_settings.py

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-03 18:43:11 +08:00
feiniks
95bad895b4
Add upload link and download link API (#683)
* Add upload link and download link API

* Use go 1.22 for ci

* Go add upload link API

* Add norm UTF8 path

* Go add upload link API

* Add seahub_settings.py

* Add projectDir

* Add download link API

* Set and check etag

* Add comment and set no-cache

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-03 18:19:37 +08:00
feiniks
b5b37e69e0
Add check Authorization header (#686)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:28:41 +08:00
feiniks
6944257cc8
Add timeout when query from database (#685)
* Add timeout when query from database

* Modify DefaultTimeout to DBOpTimeout

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:10:55 +08:00
feiniks
95f4fb3809
Set max conn and add read and write timeout (#682)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-22 18:06:15 +08:00
feiniks
738716496a
Fix security issue and add go linter (#677)
* Fix security issue and add go linter

* Fix error checked by golangci-lint

* Delete jwt-go pkg

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-12 14:59:45 +08:00
feiniks
9930112249
Go use Authorization header (#676)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-02 10:35:03 +08:00
feiniks
49c860b50d
Get nickname use seahub API (#670)
* Get nickname use seahub API

* Add parse site_root

* Use regex to match SECRET_KEY

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-30 17:58:18 +08:00
feiniks
7d26e0a8f4
Skip merge when post files with replace existed (#671)
* Skip merge when post files with replace existed

* Use handle_concurrent_update to check if merge commits

* Go handle concurrent update

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-27 10:39:09 +08:00
feiniks
6c056c1f6b
Add last_modify field in form (#666)
* Add last_modify field in form

* Go add last_modify field in form

* Use rfc3339 time format

* Add mtime for upload_blks_api

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-23 18:52:15 +08:00
杨赫然
11d4741224 Merge branch '11.0' 2024-07-16 17:37:24 +08:00
feiniks
d51591d8f7
get nickname from seahub database (#663)
* Add parse seahub database config

* Get nickname from seahub database

* Go get nickname from seahub database

* Save output of script to memory and fix some errors

* Add exec permission and free child_output

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-10 16:34:33 +08:00