1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-08-01 23:33:42 +00:00
Commit Graph

121 Commits

Author SHA1 Message Date
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
feiniks
49168a140c
Add ETag for access file (#664)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-09 16:58:35 +08:00
feiniks
cd9bae2002
Add column type to RepoInfo (#660)
* Add column type to RepoInfo

* Go fileserver check repo type

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-06-19 12:20:38 +08:00
feiniks
96996b79e3
Support argon2id password hash algo (#637)
* Support argon2id password hash algo

* CI install argon2 deps

* Go support argonid algo

* RPC add pwd_hash_algo and pwd_hash_params

* Support password hash algo

* Don't set magic when pwd_hash is set

* Fix ci error

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-05-22 18:49:57 +08:00
feiniks
9f5fcdfe4d
Add trace of pprof (#655)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-26 18:04:00 +08:00
feiniks
549c6b827f
Add error log for block write failed (#652)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-14 17:10:28 +08:00
feiniks
058b7405f1
Fix download file traffic statistics error (#651)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-13 19:49:03 +08:00
feiniks
bd6b87c2e5
Support error log rotate and notification log rotate (#649)
* Support error log rotate and notification log rotate

* Add comment

* Modify log name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-03-12 22:47:43 +08:00
feiniks
1e4790b3a2
Return 404 when notification server is disabled (#643)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-02-01 16:31:59 +08:00
feiniks
2d667a5c99
Check files with same name before post (#638)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-11-22 16:57:13 +08:00
feiniks
f659a910c9
Fix don't save server file when gen conflict file (#636)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-11-02 14:04:20 +08:00
feiniks
cc42c87d71
Fix empty commit because of encode add a newline (#633)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-10-21 10:23:21 +08:00
杨赫然
2de172f6cc Merge branch '10.0' 2023-07-25 12:05:28 +08:00
杨赫然
a19aacf198 Fix create closer error 2023-07-25 11:17:50 +08:00
杨赫然
910c338592 Merge branch '10.0' 2023-07-25 10:58:48 +08:00
feiniks
e38774ac7e
Improve worker pool (#626)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-07-20 16:39:43 +08:00
feiniks
864cef1c22
Support unix_socket option of database (#623)
* Support unix_socket option of database

* Set default auth plugin when use unix_socket

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-06-27 16:59:19 +08:00
feiniks
29e48dafa9
Allow comment sybols # and ; inside values (#615)
Co-authored-by: heran yang <heran.yang@seafile.com>
2023-05-31 15:11:44 +08:00
feiniks
4d02cb14a3
Don't escape HTML characters (#614)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2023-05-25 12:28:22 +08:00