1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-04-28 03:20:10 +00:00
Commit Graph

857 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
b1e7323647
Fix parse file access user error (#714)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-09 14:43:25 +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
31887e99e9
Read database option from env (#712)
* Read database option from env

* Don't need to read config from file

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-11-05 12:42:36 +08:00
feiniks
56f220be0a
Load config from file and env (#710)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-10-30 11:20:20 +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
8085a65174
Unescape filename (#701)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-18 18:22:29 +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
72753e152b
Return error when failed to get user from database (#700)
* Return error when failed to get user from database

* Use CCNET_ERR_INTERNAL

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-18 16:28:15 +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
594bed8c41
Read JWT_PRIVATE_KEY from env (#695)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-10 14:44:45 +08:00
feiniks
a1f2311bbf
Merge pull request #693 from haiwen/del_seahub_conf
Delete seahub_settings.py
2024-09-06 17:34:29 +08:00
杨赫然
0271675fd0 Delete seahub_settings.py 2024-09-06 17:26:50 +08:00
杨赫然
1467518615 Delete seahub_settings.py 2024-09-06 17:21:07 +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
1e8278122f
Set salt when use pwd_hash (#688)
* Use fixed repo salt

* Set default value

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-09-03 18:33:43 +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
59a9f28f70
Rpc server use epoll (#687)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-29 15:31:32 +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
4f450ea8e0
Delete RepoTokenPeerInfo when del repo (#684)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-22 18:08:29 +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
026a6d504f
Don't delete fs and block when failed to verify (#680)
* Don't delete fs and block when failed to verify

* Modify log and remove block

---------

Co-authored-by: yangheran <heran.yang@seafile.com>
2024-08-12 11:17:58 +08:00
feiniks
9492a75d0d
Fix set repaired files error (#678)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-12 10:41:53 +08:00
feiniks
31c81c1f28
Don't create repo_id unique index (#679)
* Don't create repo_id unique index

* Add index when create WebUploadTempFiles

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-09 17:45:43 +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
a535c64d13
Use Authorization header (#675)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-08-01 11:25:31 +08:00
feiniks
77fa08566b
Add gen_jwt_token RPC (#674)
* Add gen_jwt_token RPC

* Set error when failed to generate jwt token

* Modify RPC name

---------

Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-31 18:03:41 +08:00
feiniks
0a084d3c8a Don't print log when db password is ! (#673)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-31 11:56:56 +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
feiniks
de3ddbce82
Create parent dirs when revert file (#667)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
2024-07-23 11:27:49 +08:00
杨赫然
11d4741224 Merge branch '11.0' 2024-07-16 17:37:24 +08:00