Compare commits

...

41 Commits

Author SHA1 Message Date
6543
f460b7543e Changelog v1.16.4 (#19081) 2022-03-14 21:55:33 +01:00
6543
1cb649525d Restrict email address validation (#17688) (#19085)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-14 20:51:58 +01:00
6543
99861e3e06 Fix lfs bug (#19072) (#19080)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-14 15:59:54 +01:00
Gusted
66b8a43e5f Refactor mirror code & fix StartToMirror (#18904) (#19075)
- Backport #18904.
2022-03-14 20:04:41 +08:00
zeripath
d285905826 Update the webauthn_credential_id_sequence in Postgres (#19048) (#19060)
Backport #19048

There is (yet) another problem with v210 in that Postgres will silently allow preset
ID insertions ... but it will not update the sequence value.

This PR simply adds a little step to the end of the v210 migration to update the
sequence number.

Users who have already migrated who find that they cannot insert new
webauthn_credentials into the DB can either run:

```bash
gitea doctor recreate-table webauthn_credential
```

or

```bash
SELECT setval('webauthn_credential_id_seq', COALESCE((SELECT MAX(id)+1 FROM `webauthn_credential`), 1), false)
```

which will fix the bad sequence.

Fix #19012

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: 6543 <6543@obermui.de>
2022-03-13 12:02:19 +08:00
zeripath
4df2320ba6 Prevent 500 when there is an error during new auth source post (#19041) (#19059)
Backport #19041

Fix #19036

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-13 03:42:31 +01:00
zeripath
0fe99cc00c If rendering has failed due to a net.OpError stop rendering (attempt 2) (#19049) (#19056)
Backport #19049

Unfortunately #18642 does not work because a `*net.OpError` does not implement
the `Is` interface to make `errors.Is` work correctly - thus leading to the
irritating conclusion that a `*net.OpError` is not a `*net.OpError`.

Here we keep the `errors.Is` because presumably this will be fixed at
some point in the golang main source code but also we add a simply type
cast to also check.

Fix #18629

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-10 22:13:55 +01:00
Norwin
580401ecbf Fix flag validation (#19046) (#19051)
Regression from #5785
2022-03-10 20:23:55 +00:00
zeripath
7aa29720f0 Improve SyncMirrors logging (#19045) (#19050)
Backport #19045

Yet another issue has come up where the logging from SyncMirrors does not provide
enough context. This PR adds more context to these logging events.

Related #19038

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-10 16:06:35 +01:00
6543
3e5c844a77 fix pam authorization (#19040) (#19047)
Backport #19040 

The PAM module has previously only checked the results of the authentication module.

However, in normal PAM practice most users will expect account module authorization to also be checked. Without doing this check in almost every configuration expired accounts and accounts with expired passwords will still be able to login.

This is likely to represent a significant gotcha in most configurations and cause most users configurations to be potentially insecure. Therefore we should add in the account authorization check.

## ⚠️ **BREAKING** ⚠️ 

Users of the PAM module who rely on account modules not being checked will need to change their PAM configuration.

However, as it is likely that the vast majority of users of PAM will be expecting account authorization to be checked in addition to authentication we should make this breaking change to make the default behaviour correct for the majority.

---

I suggest we backport this despite the BREAKING nature because of the surprising nature of this.

Thanks to @ysf for bringing this to our attention.


Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: ysf <34326+ysf@users.noreply.github.com>
2022-03-10 08:15:35 +00:00
zeripath
4047c5c068 Ignore missing comment for user notifications (#18954) (#19043) 2022-03-10 01:48:27 -05:00
zeripath
03d924238c Set rel="nofollow noindex" on new issue links (#19023) (#19042)
Backport #19023

Fix #19018

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-03-09 23:01:30 +00:00
Lunny Xiao
bc1248ed9e Upgrading binding package (#19034) (#19035)
Backport #19034

Fix #18855
2022-03-09 18:07:46 +00:00
zeripath
dd52c08b74 Don't show context cancelled errors in attribute reader (#19006) (#19027)
Backport #19006

Fix #18997

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-03-08 19:20:37 +08:00
Lunny Xiao
b811b819e2 Fix update hint bug (#19002) 2022-03-04 18:28:17 +00:00
Otto Richter (fnetX)
da985b25ce Fix potential assignee query for repo (#18994) (#18999)
* Fix potential assignee query for repo

* Add tests for `GetRepoAssignees`

- As per https://github.com/go-gitea/gitea/pull/18994#issuecomment-1058506640

Co-authored-by: Gusted <williamzijl7@hotmail.com>
2022-03-05 00:12:34 +08:00
6543
ae9c51df7c allow overwrite artifacts for github releases (#18987) (#18988) 2022-03-03 16:18:55 +01:00
Lunny Xiao
ff1c5815bb Changelog for v1.16.3 (#18966)
* Changelog for v1.16.3

* Update CHANGELOG.md

* Apply suggestions from code review

* Apply suggestions from code review

Co-authored-by: Gusted <williamzijl7@hotmail.com>

Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Gusted <williamzijl7@hotmail.com>
2022-03-03 10:50:36 +08:00
6543
87f8d37be5 git backend ignore replace objects (#18979) (#18980)
Co-authored-by: zeripath <art27@cantab.net>
2022-03-02 21:31:50 +00:00
Otto Richter (fnetX)
f4b96c1041 Set max text height to prevent overflow (#18862) (#18977)
Sets a max height for review text boxes to prevent a very annoying bug where users cannot access the "submit" button.

Before:
![image](https://user-images.githubusercontent.com/12700993/155253001-e1dab086-aaf3-4338-889d-6a861728274a.png)

After:
![image](https://user-images.githubusercontent.com/12700993/155253144-5b9a3547-9582-412f-867f-41a45a14a0fe.png)

Interestingly, I don't see this bug on Firefox.

Co-authored-by: Kyle D <kdumontnu@gmail.com>
2022-03-02 20:12:48 +00:00
Otto Richter (fnetX)
a3f72303d1 Fix problem when self-assign notification (#18797) (#18976)
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-02 20:11:55 +00:00
6543
4317806ade backport fix of #18973 (#18974) 2022-03-02 19:42:02 +00:00
Otto Richter (fnetX)
578f19a682 Refactor admin user filter query parameters (#18965) (#18975)
Only pass `status_filter` on admin page
Use a more general method to pass query parameters, remove hard-coded keys

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2022-03-02 19:57:18 +01:00
6543
f9b6404950 Accounts with WebAuthn only (no TOTP) now exist ... fix code to handle that case (#18897) (#18964) 2022-03-02 07:22:02 -06:00
Gusted
52517e3e23 Send 404 on /{org}.gpg (#18959) (#18962) 2022-03-01 20:37:47 -05:00
Otto Richter (fnetX)
36e96e3481 Fix admin user list pagination (#18957) (#18960) 2022-03-01 23:00:03 +00:00
Lunny Xiao
a765410d0f Fix lfs management setting (#18947) 2022-03-01 14:14:18 -05:00
6543
43fc2e528c Backport locales from master (#18944)
* update

* clean

* clean2

* clean2

* clean-next

* cleanup

* finish cleanup
2022-02-28 21:19:19 +00:00
Lunny Xiao
cb90eda213 Fix login with email panic when email is not exist (#18942)
Co-authored-by: 6543 <6543@obermui.de>
2022-02-28 18:14:50 +00:00
zeripath
5f9c18b2b3 Adjust error for already locked db and prevent level db lock on malformed connstr (#18923) (#18938)
Backport #18923

This PR adjusts the error returned when there is failure to lock the level db, and
permits a connections to the same leveldb where there is a different connection string.

Reference #18921
Reference #18917

Signed-off-by: Andrew Thornton <art27@cantab.net>
2022-02-28 15:45:38 +00:00
Gusted
4384b85046 Update go-org to v1.6.1 (#18932) (#18933)
Backport #18932
2022-02-27 16:57:06 +00:00
Gusted
e0973a84a0 Fix <strong> html in translation (#18929) (#18931)
Backport #18929
2022-02-27 15:46:34 +00:00
qwerty287
054bc55a1c Fix page and missing return on unadopted repos API (#18848) (#18927)
* Fix page and missing return on unadopted repos API

Page must be 1 if it's not specified and it should return after sending an internal server error.

* Allow ignore pages
2022-02-27 20:18:23 +08:00
Gusted
4fb718d405 Don't treat BOM escape sequence as hidden character. (#18909) (#18910)
* Don't treat BOM escape sequence as hidden character. (#18909)

Backport #18909
2022-02-26 23:15:04 +01:00
Gusted
df35049196 Allow adminstrator teams members to see other teams (#18918) (#18919)
Allow adminstrator teams members to see other teams (#18918)
2022-02-26 22:45:34 +01:00
silverwind
ce75461380 Correctly link URLs to users/repos with dashes, dots or underscores (#18890) (#18908)
* Add tests for references with dashes

This commit adds tests for full URLs referencing repos names and user
names containing a dash.

* Extend regex to match URLs to repos/users with dashes

Co-authored-by: Alexander Neumann <62751754+rtpt-alexanderneumann@users.noreply.github.com>
2022-02-26 06:45:09 +01:00
Gusted
cea85c30a4 Don't update email for organisation (#18905) (#18906)
Backport #18905
2022-02-26 03:10:21 +01:00
Otto Richter (fnetX)
6039138323 Fix redirect when using lowercase reponame (#18775) (#18902)
* Previously,  `GET {username}/{reponame}/raw///file-path` (the middle two slashes are blank to get the default branch) when the repo name has uppercase letters, e.g., https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware, using a lowercase version of the name redirected to the correct URL
* In other words both
   * `GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw///images/back.png`
   * `GET https://try.gitea.io/AbdulrhmnGhanem/ch330_hardware/raw///images/back.png`
were redirecting to ` GET https://try.gitea.io/AbdulrhmnGhanem/CH330_Hardware/raw/branch/master/images/back.png`
This isn't the case after  #17551. Specifically because of this [line](cbd5eecd14/modules/context/repo.go (L860)).

Co-authored-by: Ghanem <37152329+AbdulrhmnGhanem@users.noreply.github.com>
2022-02-26 08:16:22 +08:00
Lunny Xiao
eb43e73785 Fix team management UI (#18887) 2022-02-25 21:51:22 +01:00
Lunny Xiao
c077a0361a Fix migration v210 (#18893) 2022-02-25 15:08:00 +01:00
Jimmy Praet
6f21a94d18 BeforeSourcePath should point to base commit (#18880) 2022-02-25 14:45:20 +08:00
67 changed files with 850 additions and 309 deletions

View File

@@ -804,11 +804,12 @@ steps:
depends_on: [gpg-sign] depends_on: [gpg-sign]
- name: github - name: github
image: plugins/github-release:1 image: plugins/github-release:latest
pull: always pull: always
settings: settings:
files: files:
- "dist/release/*" - "dist/release/*"
file_exists: overwrite
environment: environment:
GITHUB_TOKEN: GITHUB_TOKEN:
from_secret: github_token from_secret: github_token

View File

@@ -4,6 +4,57 @@ This changelog goes through all the changes that have been made in each release
without substantial changes to our git log; to see the highlights of what has without substantial changes to our git log; to see the highlights of what has
been added to each release, please refer to the [blog](https://blog.gitea.io). been added to each release, please refer to the [blog](https://blog.gitea.io).
## [1.16.4](https://github.com/go-gitea/gitea/releases/tag/v1.16.4) - 2022-03-14
* SECURITY
* Restrict email address validation (#17688) (#19085)
* Fix lfs bug (#19072) (#19080)
* ENHANCEMENTS
* Improve SyncMirrors logging (#19045) (#19050)
* BUGFIXES
* Refactor mirror code & fix `StartToMirror` (#18904) (#19075)
* Update the webauthn_credential_id_sequence in Postgres (#19048) (#19060)
* Prevent 500 when there is an error during new auth source post (#19041) (#19059)
* If rendering has failed due to a net.OpError stop rendering (attempt 2) (#19049) (#19056)
* Fix flag validation (#19046) (#19051)
* Add pam account authorization check (#19040) (#19047)
* Ignore missing comment for user notifications (#18954) (#19043)
* Set `rel="nofollow noindex"` on new issue links (#19023) (#19042)
* Upgrading binding package (#19034) (#19035)
* Don't show context cancelled errors in attribute reader (#19006) (#19027)
* Fix update hint bug (#18996) (#19002)
* MISC
* Fix potential assignee query for repo (#18994) (#18999)
## [1.16.3](https://github.com/go-gitea/gitea/releases/tag/v1.16.3) - 2022-03-02
* SECURITY
* Git backend ignore replace objects (#18979) (#18980)
* ENHANCEMENTS
* Adjust error for already locked db and prevent level db lock on malformed connstr (#18923) (#18938)
* BUGFIXES
* Set max text height to prevent overflow (#18862) (#18977)
* Fix newAttachmentPaths deletion for DeleteRepository() (#18973) (#18974)
* Accounts with WebAuthn only (no TOTP) now exist ... fix code to handle that case (#18897) (#18964)
* Send 404 on `/{org}.gpg` (#18959) (#18962)
* Fix admin user list pagination (#18957) (#18960)
* Fix lfs management setting (#18947) (#18946)
* Fix login with email panic when email is not exist (#18942)
* Update go-org to v1.6.1 (#18932) (#18933)
* Fix `<strong>` html in translation (#18929) (#18931)
* Fix page and missing return on unadopted repos API (#18848) (#18927)
* Allow adminstrator teams members to see other teams (#18918) (#18919)
* Don't treat BOM escape sequence as hidden character. (#18909) (#18910)
* Correctly link URLs to users/repos with dashes, dots or underscores (… (#18908)
* Fix redirect when using lowercase repo name (#18775) (#18902)
* Fix migration v210 (#18893) (#18892)
* Fix team management UI (#18887) (18886)
* BeforeSourcePath should point to base commit (#18880) (#18799)
* TRANSLATION
* Backport locales from master (#18944)
* MISC
* Don't update email for organisation (#18905) (#18906)
## [1.16.2](https://github.com/go-gitea/gitea/releases/tag/v1.16.2) - 2022-02-24 ## [1.16.2](https://github.com/go-gitea/gitea/releases/tag/v1.16.2) - 2022-02-24
* ENHANCEMENTS * ENHANCEMENTS

View File

@@ -31,7 +31,7 @@ func argsSet(c *cli.Context, args ...string) error {
return errors.New(a + " is not set") return errors.New(a + " is not set")
} }
if util.IsEmptyString(a) { if util.IsEmptyString(c.String(a)) {
return errors.New(a + " is required") return errors.New(a + " is required")
} }
} }

View File

@@ -42,7 +42,7 @@ To maintain understandable code and avoid circular dependencies it is important
- `modules/setting`: Store all system configurations read from ini files and has been referenced by everywhere. But they should be used as function parameters when possible. - `modules/setting`: Store all system configurations read from ini files and has been referenced by everywhere. But they should be used as function parameters when possible.
- `modules/git`: Package to interactive with `Git` command line or Gogit package. - `modules/git`: Package to interactive with `Git` command line or Gogit package.
- `public`: Compiled frontend files (javascript, images, css, etc.) - `public`: Compiled frontend files (javascript, images, css, etc.)
- `routers`: Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) shall not depend on routers. - `routers`: Handling of server requests. As it uses other Gitea packages to serve the request, other packages (models, modules or services) must not depend on routers.
- `routers/api` Contains routers for `/api/v1` aims to handle RESTful API requests. - `routers/api` Contains routers for `/api/v1` aims to handle RESTful API requests.
- `routers/install` Could only respond when system is in INSTALL mode (INSTALL_LOCK=false). - `routers/install` Could only respond when system is in INSTALL mode (INSTALL_LOCK=false).
- `routers/private` will only be invoked by internal sub commands, especially `serv` and `hooks`. - `routers/private` will only be invoked by internal sub commands, especially `serv` and `hooks`.
@@ -106,10 +106,20 @@ i.e. `servcies/user`, `models/repository`.
Since there are some packages which use the same package name, it is possible that you find packages like `modules/user`, `models/user`, and `services/user`. When these packages are imported in one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So, we always recommend to use import aliases. To differ from package variables which are commonly in camelCase, just use **snake_case** for import aliases. Since there are some packages which use the same package name, it is possible that you find packages like `modules/user`, `models/user`, and `services/user`. When these packages are imported in one Go file, it's difficult to know which package we are using and if it's a variable name or an import name. So, we always recommend to use import aliases. To differ from package variables which are commonly in camelCase, just use **snake_case** for import aliases.
i.e. `import user_service "code.gitea.io/gitea/services/user"` i.e. `import user_service "code.gitea.io/gitea/services/user"`
### Important Gotchas
- Never write `x.Update(exemplar)` without an explicit `WHERE` clause:
- This will cause all rows in the table to be updated with the non-zero values of the exemplar - including IDs.
- You should usually write `x.ID(id).Update(exemplar)`.
- If during a migration you are inserting into a table using `x.Insert(exemplar)` where the ID is preset:
- You will need to ``SET IDENTITY_INSERT `table` ON`` for the MSSQL variant (the migration will fail otherwise)
- However, you will also need to update the id sequence for postgres - the migration will silently pass here but later insertions will fail:
``SELECT setval('table_name_id_seq', COALESCE((SELECT MAX(id)+1 FROM `table_name`), 1), false)``
### Future Tasks ### Future Tasks
Currently, we are creating some refactors to do the following things: Currently, we are creating some refactors to do the following things:
- Correct that codes which doesn't follow the rules. - Correct that codes which doesn't follow the rules.
- There are too many files in `models`, so we are moving some of them into a sub package `models/xxx`. - There are too many files in `models`, so we are moving some of them into a sub package `models/xxx`.
- Some `modules` sub packages should be moved to `services` because they depends on `models`. - Some `modules` sub packages should be moved to `services` because they depend on `models`.

4
go.mod
View File

@@ -6,7 +6,7 @@ require (
cloud.google.com/go v0.78.0 // indirect cloud.google.com/go v0.78.0 // indirect
code.gitea.io/gitea-vet v0.2.1 code.gitea.io/gitea-vet v0.2.1
code.gitea.io/sdk/gitea v0.15.1 code.gitea.io/sdk/gitea v0.15.1
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1 gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1
gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5 gitea.com/go-chi/captcha v0.0.0-20211013065431-70641c1a35d5
gitea.com/go-chi/session v0.0.0-20211218221615-e3605d8b28b8 gitea.com/go-chi/session v0.0.0-20211218221615-e3605d8b28b8
@@ -85,7 +85,7 @@ require (
github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect github.com/mrjones/oauth v0.0.0-20190623134757-126b35219450 // indirect
github.com/msteinert/pam v0.0.0-20201130170657-e61372126161 github.com/msteinert/pam v0.0.0-20201130170657-e61372126161
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
github.com/niklasfasching/go-org v1.6.0 github.com/niklasfasching/go-org v1.6.1
github.com/olekukonko/tablewriter v0.0.5 // indirect github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/oliamb/cutter v0.2.2 github.com/oliamb/cutter v0.2.2
github.com/olivere/elastic/v7 v7.0.25 github.com/olivere/elastic/v7 v7.0.25

15
go.sum
View File

@@ -41,8 +41,8 @@ code.gitea.io/gitea-vet v0.2.1/go.mod h1:zcNbT/aJEmivCAhfmkHOlT645KNOf9W2KnkLgFj
code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M= code.gitea.io/sdk/gitea v0.15.1 h1:WJreC7YYuxbn0UDaPuWIe/mtiNKTvLN8MLkaw71yx/M=
code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA= code.gitea.io/sdk/gitea v0.15.1/go.mod h1:klY2LVI3s3NChzIk/MzMn7G1FHrfU7qd63iSMVoHRBA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be h1:IzSwPVzd2hE6e67ujY8ReBCrQ5IFNd0uiBmC7Ux5IaY= gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb h1:Yy0Bxzc8R2wxiwXoG/rECGplJUSpXqCsog9PuJFgiHs=
gitea.com/go-chi/binding v0.0.0-20211013065440-d16dc407c2be/go.mod h1:/vR0YjlusOYvosKYW7QKcSnrY0nPLe4RQ/DGi3+i/Do= gitea.com/go-chi/binding v0.0.0-20220309004920-114340dabecb/go.mod h1:77TZu701zMXWJFvB8gvTbQ92zQ3DQq/H7l5wAEjQRKc=
gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0= gitea.com/go-chi/cache v0.0.0-20210110083709-82c4c9ce2d5e/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1 h1:Z7DcvTkxt8ovcENgPsQ7xzrGNSQmmIjGS9fJEb1l8jk= gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1 h1:Z7DcvTkxt8ovcENgPsQ7xzrGNSQmmIjGS9fJEb1l8jk=
gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0= gitea.com/go-chi/cache v0.0.0-20211013020926-78790b11abf1/go.mod h1:k2V/gPDEtXGjjMGuBJiapffAXTv76H4snSmlJRLUhH0=
@@ -202,7 +202,6 @@ github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chaseadamsio/goorgeous v2.0.0+incompatible/go.mod h1:6QaC0vFoKWYDth94dHFNgRT2YkT5FHdQp/Yx15aAAi0=
github.com/chi-middleware/proxy v1.1.1 h1:4HaXUp8o2+bhHr1OhVy+VjN0+L7/07JDcn6v7YrTjrQ= github.com/chi-middleware/proxy v1.1.1 h1:4HaXUp8o2+bhHr1OhVy+VjN0+L7/07JDcn6v7YrTjrQ=
github.com/chi-middleware/proxy v1.1.1/go.mod h1:jQwMEJct2tz9VmtCELxvnXoMfa+SOdikvbVJVHv/M+0= github.com/chi-middleware/proxy v1.1.1/go.mod h1:jQwMEJct2tz9VmtCELxvnXoMfa+SOdikvbVJVHv/M+0=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
@@ -490,8 +489,9 @@ github.com/gobuffalo/packr/v2 v2.2.0/go.mod h1:CaAwI0GPIAv+5wKLtv8Afwl+Cm78K/I/V
github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw= github.com/gobuffalo/syncx v0.0.0-20190224160051-33c29581e754/go.mod h1:HhnNqWY95UYwwW3uSASeV7vtgYkT2t16hJgV3AEPUpw=
github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y= github.com/gobwas/glob v0.2.3 h1:A4xDbljILXROh+kObIiy5kIaPYD8e96x1tgBhUI5J+Y=
github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8= github.com/gobwas/glob v0.2.3/go.mod h1:d3Ez4x06l9bZtSvzIay5+Yzi0fmZzPgnTbPcKjJAkT8=
github.com/goccy/go-json v0.7.4 h1:B44qRUFwz/vxPKPISQ1KhvzRi9kZ28RAf6YtjriBZ5k=
github.com/goccy/go-json v0.7.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I= github.com/goccy/go-json v0.7.4/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/goccy/go-json v0.9.5 h1:ooSMW526ZjK+EaL5elrSyN2EzIfi/3V0m4+HJEDYLik=
github.com/goccy/go-json v0.9.5/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= github.com/gofrs/uuid v4.2.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
@@ -913,8 +913,8 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 h1:zYyBkD/k9seD2A7fsi6Oo2LfFZAehjjQMERAvZLEDnQ=
github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/niklasfasching/go-org v1.6.0 h1:NCWpmDDNjHNsrei6VmnYXzOiyZUxV8LVU19REGQ8dKA= github.com/niklasfasching/go-org v1.6.1 h1:vaGWr6TPqprkAbOJ/+E08mgZxsLM0SCOqWo9D5plj4U=
github.com/niklasfasching/go-org v1.6.0/go.mod h1:gSHyFcAbr2thIpfljLsP/BB8uwAMyooq6ydIrUDdOCs= github.com/niklasfasching/go-org v1.6.1/go.mod h1:3m8LIjGNz0ijv6UQzCpDl/bORThFI80/1xz2r1GgIT0=
github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ= github.com/nwaples/rardecode v1.1.0 h1:vSxaY8vQhOcVr4mm5e8XllHWTiM4JF507A0Katqw7MQ=
github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/nwaples/rardecode v1.1.0/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0=
github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78=
@@ -1033,9 +1033,8 @@ github.com/rs/xid v1.3.0 h1:6NjYksEUlhurdVehpc7S7dk6DAmcKv8V9gG0FsVN2U4=
github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU= github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc= github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/russross/blackfriday v1.6.0/go.mod h1:ti0ldHuxg49ri4ksnFxlkCfN+hvslNlmVHqNRXXJNAY=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=

View File

@@ -445,7 +445,6 @@ func TestAPIRepoTransfer(t *testing.T) {
expectedStatus int expectedStatus int
}{ }{
// Disclaimer for test story: "user1" is an admin, "user2" is normal user and part of in owner team of org "user3" // Disclaimer for test story: "user1" is an admin, "user2" is normal user and part of in owner team of org "user3"
// Transfer to a user with teams in another org should fail // Transfer to a user with teams in another org should fail
{ctxUserID: 1, newOwner: "user3", teams: &[]int64{5}, expectedStatus: http.StatusForbidden}, {ctxUserID: 1, newOwner: "user3", teams: &[]int64{5}, expectedStatus: http.StatusForbidden},
// Transfer to a user with non-existent team IDs should fail // Transfer to a user with non-existent team IDs should fail

View File

@@ -193,12 +193,13 @@ func LFSAutoAssociate(metas []*LFSMetaObject, user *user_model.User, repoID int6
// admin can associate any LFS object to any repository, and we do not care about errors (eg: duplicated unique key), // admin can associate any LFS object to any repository, and we do not care about errors (eg: duplicated unique key),
// even if error occurs, it won't hurt users and won't make things worse // even if error occurs, it won't hurt users and won't make things worse
for i := range metas { for i := range metas {
p := lfs.Pointer{Oid: metas[i].Oid, Size: metas[i].Size}
_, err = sess.Insert(&LFSMetaObject{ _, err = sess.Insert(&LFSMetaObject{
Pointer: lfs.Pointer{Oid: metas[i].Oid, Size: metas[i].Size}, Pointer: p,
RepositoryID: repoID, RepositoryID: repoID,
}) })
if err != nil { if err != nil {
log.Warn("failed to insert LFS meta object into database, err=%v", err) log.Warn("failed to insert LFS meta object %-v for repo_id: %d into database, err=%v", p, repoID, err)
} }
} }
} }

View File

@@ -61,7 +61,6 @@ type Version struct {
// update minDBVersion accordingly // update minDBVersion accordingly
var migrations = []Migration{ var migrations = []Migration{
// Gitea 1.5.0 ends at v69 // Gitea 1.5.0 ends at v69
// v70 -> v71 // v70 -> v71
NewMigration("add issue_dependencies", addIssueDependencies), NewMigration("add issue_dependencies", addIssueDependencies),
// v71 -> v72 // v71 -> v72

View File

@@ -11,8 +11,8 @@ import (
"strings" "strings"
"code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/timeutil"
"github.com/tstranex/u2f"
"github.com/tstranex/u2f"
"xorm.io/xorm" "xorm.io/xorm"
"xorm.io/xorm/schemas" "xorm.io/xorm/schemas"
) )
@@ -137,17 +137,23 @@ func remigrateU2FCredentials(x *xorm.Engine) error {
CreatedUnix: reg.CreatedUnix, CreatedUnix: reg.CreatedUnix,
} }
has, err := sess.ID(reg.ID).Where("id = ?", reg.ID).Get(new(webauthnCredential)) has, err := sess.ID(reg.ID).Get(new(webauthnCredential))
if err != nil { if err != nil {
return fmt.Errorf("unable to get webauthn_credential[%d]. Error: %w", reg.ID, err) return fmt.Errorf("unable to get webauthn_credential[%d]. Error: %w", reg.ID, err)
} }
if !has { if !has {
_, err = sess.Insert(remigrated) has, err := sess.Where("`lower_name`=?", remigrated.LowerName).And("`user_id`=?", remigrated.UserID).Exist(new(webauthnCredential))
if err != nil { if err != nil {
return fmt.Errorf("unable to (re)insert webauthn_credential[%d]. Error: %w", reg.ID, err) return fmt.Errorf("unable to check webauthn_credential[lower_name: %s, user_id:%v]. Error: %w", remigrated.LowerName, remigrated.UserID, err)
} }
if !has {
_, err = sess.Insert(remigrated)
if err != nil {
return fmt.Errorf("unable to (re)insert webauthn_credential[%d]. Error: %w", reg.ID, err)
}
continue continue
}
} }
_, err = sess.ID(remigrated.ID).AllCols().Update(remigrated) _, err = sess.ID(remigrated.ID).AllCols().Update(remigrated)
@@ -168,5 +174,11 @@ func remigrateU2FCredentials(x *xorm.Engine) error {
regs = regs[:0] regs = regs[:0]
} }
if x.Dialect().URI().DBType == schemas.POSTGRES {
if _, err := x.Exec("SELECT setval('webauthn_credential_id_seq', COALESCE((SELECT MAX(id)+1 FROM `webauthn_credential`), 1), false)"); err != nil {
return err
}
}
return nil return nil
} }

View File

@@ -8,6 +8,7 @@ import (
"testing" "testing"
"code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/timeutil"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"xorm.io/xorm/schemas" "xorm.io/xorm/schemas"
) )

View File

@@ -498,14 +498,15 @@ func (n *Notification) APIURL() string {
type NotificationList []*Notification type NotificationList []*Notification
// LoadAttributes load Repo Issue User and Comment if not loaded // LoadAttributes load Repo Issue User and Comment if not loaded
func (nl NotificationList) LoadAttributes() (err error) { func (nl NotificationList) LoadAttributes() error {
var err error
for i := 0; i < len(nl); i++ { for i := 0; i < len(nl); i++ {
err = nl[i].LoadAttributes() err = nl[i].LoadAttributes()
if err != nil && !IsErrCommentNotExist(err) { if err != nil && !IsErrCommentNotExist(err) {
return return err
} }
} }
return return nil
} }
func (nl NotificationList) getPendingRepoIDs() []int64 { func (nl NotificationList) getPendingRepoIDs() []int64 {

View File

@@ -153,7 +153,7 @@ func getRepoAssignees(ctx context.Context, repo *repo_model.Repository) (_ []*us
userIDs := make([]int64, 0, 10) userIDs := make([]int64, 0, 10)
if err = e.Table("access"). if err = e.Table("access").
Where("repo_id = ? AND mode >= ?", repo.ID, perm.AccessModeWrite). Where("repo_id = ? AND mode >= ?", repo.ID, perm.AccessModeWrite).
Select("id"). Select("user_id").
Find(&userIDs); err != nil { Find(&userIDs); err != nil {
return nil, err return nil, err
} }
@@ -977,7 +977,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error {
// Remove attachment with no issue_id and release_id. // Remove attachment with no issue_id and release_id.
for i := range newAttachmentPaths { for i := range newAttachmentPaths {
admin_model.RemoveStorageWithNotice(db.DefaultContext, storage.Attachments, "Delete issue attachment", attachmentPaths[i]) admin_model.RemoveStorageWithNotice(db.DefaultContext, storage.Attachments, "Delete issue attachment", newAttachmentPaths[i])
} }
if len(repo.Avatar) > 0 { if len(repo.Avatar) > 0 {

View File

@@ -167,3 +167,21 @@ func TestLinkedRepository(t *testing.T) {
}) })
} }
} }
func TestRepoAssignees(t *testing.T) {
assert.NoError(t, unittest.PrepareTestDatabase())
repo2 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 2}).(*repo_model.Repository)
users, err := GetRepoAssignees(repo2)
assert.NoError(t, err)
assert.Len(t, users, 1)
assert.Equal(t, users[0].ID, int64(2))
repo21 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{ID: 21}).(*repo_model.Repository)
users, err = GetRepoAssignees(repo21)
assert.NoError(t, err)
assert.Len(t, users, 3)
assert.Equal(t, users[0].ID, int64(15))
assert.Equal(t, users[1].ID, int64(18))
assert.Equal(t, users[2].ID, int64(16))
}

View File

@@ -10,6 +10,7 @@ import (
"errors" "errors"
"fmt" "fmt"
"net/mail" "net/mail"
"regexp"
"strings" "strings"
"code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/db"
@@ -21,10 +22,23 @@ import (
"xorm.io/builder" "xorm.io/builder"
) )
var ( // ErrEmailNotActivated e-mail address has not been activated error
// ErrEmailNotActivated e-mail address has not been activated error var ErrEmailNotActivated = errors.New("e-mail address has not been activated")
ErrEmailNotActivated = errors.New("E-mail address has not been activated")
) // ErrEmailCharIsNotSupported e-mail address contains unsupported character
type ErrEmailCharIsNotSupported struct {
Email string
}
// IsErrEmailCharIsNotSupported checks if an error is an ErrEmailCharIsNotSupported
func IsErrEmailCharIsNotSupported(err error) bool {
_, ok := err.(ErrEmailCharIsNotSupported)
return ok
}
func (err ErrEmailCharIsNotSupported) Error() string {
return fmt.Sprintf("e-mail address contains unsupported character [email: %s]", err.Email)
}
// ErrEmailInvalid represents an error where the email address does not comply with RFC 5322 // ErrEmailInvalid represents an error where the email address does not comply with RFC 5322
type ErrEmailInvalid struct { type ErrEmailInvalid struct {
@@ -108,12 +122,24 @@ func (email *EmailAddress) BeforeInsert() {
} }
} }
var emailRegexp = regexp.MustCompile("^[a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$")
// ValidateEmail check if email is a allowed address // ValidateEmail check if email is a allowed address
func ValidateEmail(email string) error { func ValidateEmail(email string) error {
if len(email) == 0 { if len(email) == 0 {
return nil return nil
} }
if !emailRegexp.MatchString(email) {
return ErrEmailCharIsNotSupported{email}
}
if !(email[0] >= 'a' && email[0] <= 'z') &&
!(email[0] >= 'A' && email[0] <= 'Z') &&
!(email[0] >= '0' && email[0] <= '9') {
return ErrEmailInvalid{email}
}
if _, err := mail.ParseAddress(email); err != nil { if _, err := mail.ParseAddress(email); err != nil {
return ErrEmailInvalid{email} return ErrEmailInvalid{email}
} }

View File

@@ -252,3 +252,58 @@ func TestListEmails(t *testing.T) {
assert.Len(t, emails, 5) assert.Len(t, emails, 5)
assert.Greater(t, count, int64(len(emails))) assert.Greater(t, count, int64(len(emails)))
} }
func TestEmailAddressValidate(t *testing.T) {
kases := map[string]error{
"abc@gmail.com": nil,
"132@hotmail.com": nil,
"1-3-2@test.org": nil,
"1.3.2@test.org": nil,
"a_123@test.org.cn": nil,
`first.last@iana.org`: nil,
`first!last@iana.org`: nil,
`first#last@iana.org`: nil,
`first$last@iana.org`: nil,
`first%last@iana.org`: nil,
`first&last@iana.org`: nil,
`first'last@iana.org`: nil,
`first*last@iana.org`: nil,
`first+last@iana.org`: nil,
`first/last@iana.org`: nil,
`first=last@iana.org`: nil,
`first?last@iana.org`: nil,
`first^last@iana.org`: nil,
"first`last@iana.org": nil,
`first{last@iana.org`: nil,
`first|last@iana.org`: nil,
`first}last@iana.org`: nil,
`first~last@iana.org`: nil,
`first;last@iana.org`: ErrEmailCharIsNotSupported{`first;last@iana.org`},
".233@qq.com": ErrEmailInvalid{".233@qq.com"},
"!233@qq.com": ErrEmailInvalid{"!233@qq.com"},
"#233@qq.com": ErrEmailInvalid{"#233@qq.com"},
"$233@qq.com": ErrEmailInvalid{"$233@qq.com"},
"%233@qq.com": ErrEmailInvalid{"%233@qq.com"},
"&233@qq.com": ErrEmailInvalid{"&233@qq.com"},
"'233@qq.com": ErrEmailInvalid{"'233@qq.com"},
"*233@qq.com": ErrEmailInvalid{"*233@qq.com"},
"+233@qq.com": ErrEmailInvalid{"+233@qq.com"},
"/233@qq.com": ErrEmailInvalid{"/233@qq.com"},
"=233@qq.com": ErrEmailInvalid{"=233@qq.com"},
"?233@qq.com": ErrEmailInvalid{"?233@qq.com"},
"^233@qq.com": ErrEmailInvalid{"^233@qq.com"},
"`233@qq.com": ErrEmailInvalid{"`233@qq.com"},
"{233@qq.com": ErrEmailInvalid{"{233@qq.com"},
"|233@qq.com": ErrEmailInvalid{"|233@qq.com"},
"}233@qq.com": ErrEmailInvalid{"}233@qq.com"},
"~233@qq.com": ErrEmailInvalid{"~233@qq.com"},
";233@qq.com": ErrEmailCharIsNotSupported{";233@qq.com"},
"Foo <foo@bar.com>": ErrEmailCharIsNotSupported{"Foo <foo@bar.com>"},
string([]byte{0xE2, 0x84, 0xAA}): ErrEmailCharIsNotSupported{string([]byte{0xE2, 0x84, 0xAA})},
}
for kase, err := range kases {
t.Run(kase, func(t *testing.T) {
assert.EqualValues(t, err, ValidateEmail(kase))
})
}
}

View File

@@ -30,13 +30,19 @@ func (users UserList) GetTwoFaStatus() map[int64]bool {
for _, user := range users { for _, user := range users {
results[user.ID] = false // Set default to false results[user.ID] = false // Set default to false
} }
tokenMaps, err := users.loadTwoFactorStatus(db.GetEngine(db.DefaultContext))
if err == nil { if tokenMaps, err := users.loadTwoFactorStatus(db.GetEngine(db.DefaultContext)); err == nil {
for _, token := range tokenMaps { for _, token := range tokenMaps {
results[token.UID] = true results[token.UID] = true
} }
} }
if ids, err := users.userIDsWithWebAuthn(db.GetEngine(db.DefaultContext)); err == nil {
for _, id := range ids {
results[id] = true
}
}
return results return results
} }
@@ -47,15 +53,23 @@ func (users UserList) loadTwoFactorStatus(e db.Engine) (map[int64]*auth.TwoFacto
userIDs := users.GetUserIDs() userIDs := users.GetUserIDs()
tokenMaps := make(map[int64]*auth.TwoFactor, len(userIDs)) tokenMaps := make(map[int64]*auth.TwoFactor, len(userIDs))
err := e. if err := e.In("uid", userIDs).Find(&tokenMaps); err != nil {
In("uid", userIDs).
Find(&tokenMaps)
if err != nil {
return nil, fmt.Errorf("find two factor: %v", err) return nil, fmt.Errorf("find two factor: %v", err)
} }
return tokenMaps, nil return tokenMaps, nil
} }
func (users UserList) userIDsWithWebAuthn(e db.Engine) ([]int64, error) {
if len(users) == 0 {
return nil, nil
}
ids := make([]int64, 0, len(users))
if err := e.Table(new(auth.WebAuthnCredential)).In("user_id", users.GetUserIDs()).Select("user_id").Distinct("user_id").Find(&ids); err != nil {
return nil, fmt.Errorf("find two factor: %v", err)
}
return ids, nil
}
// GetUsersByIDs returns all resolved users from a list of Ids. // GetUsersByIDs returns all resolved users from a list of Ids.
func GetUsersByIDs(ids []int64) (UserList, error) { func GetUsersByIDs(ids []int64) (UserList, error) {
ous := make([]*User, 0, len(ids)) ous := make([]*User, 0, len(ids))

View File

@@ -20,6 +20,7 @@ import (
// SearchUserOptions contains the options for searching // SearchUserOptions contains the options for searching
type SearchUserOptions struct { type SearchUserOptions struct {
db.ListOptions db.ListOptions
Keyword string Keyword string
Type UserType Type UserType
UID int64 UID int64
@@ -33,6 +34,8 @@ type SearchUserOptions struct {
IsRestricted util.OptionalBool IsRestricted util.OptionalBool
IsTwoFactorEnabled util.OptionalBool IsTwoFactorEnabled util.OptionalBool
IsProhibitLogin util.OptionalBool IsProhibitLogin util.OptionalBool
ExtraParamStrings map[string]string
} }
func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session { func (opts *SearchUserOptions) toSearchQueryBase() *xorm.Session {

View File

@@ -644,6 +644,15 @@ func CreateUser(u *User, overwriteDefault ...*CreateUserOverwriteOptions) (err e
u.Visibility = overwriteDefault[0].Visibility u.Visibility = overwriteDefault[0].Visibility
} }
// validate data
if err := validateUser(u); err != nil {
return err
}
if err := ValidateEmail(u.Email); err != nil {
return err
}
ctx, committer, err := db.TxContext() ctx, committer, err := db.TxContext()
if err != nil { if err != nil {
return err return err
@@ -652,11 +661,6 @@ func CreateUser(u *User, overwriteDefault ...*CreateUserOverwriteOptions) (err e
sess := db.GetEngine(ctx) sess := db.GetEngine(ctx)
// validate data
if err := validateUser(u); err != nil {
return err
}
isExist, err := isUserExist(sess, 0, u.Name) isExist, err := isUserExist(sess, 0, u.Name)
if err != nil { if err != nil {
return err return err
@@ -861,7 +865,7 @@ func updateUser(ctx context.Context, u *User, changePrimaryEmail bool, cols ...s
}); err != nil { }); err != nil {
return err return err
} }
} else { // check if primary email in email_address table } else if !u.IsOrganization() { // check if primary email in email_address table
primaryEmailExist, err := e.Where("uid=? AND is_primary=?", u.ID, true).Exist(&EmailAddress{}) primaryEmailExist, err := e.Where("uid=? AND is_primary=?", u.ID, true).Exist(&EmailAddress{})
if err != nil { if err != nil {
return err return err

View File

@@ -232,7 +232,7 @@ func TestCreateUserInvalidEmail(t *testing.T) {
err := CreateUser(user) err := CreateUser(user)
assert.Error(t, err) assert.Error(t, err)
assert.True(t, IsErrEmailInvalid(err)) assert.True(t, IsErrEmailCharIsNotSupported(err))
} }
func TestCreateUserEmailAlreadyUsed(t *testing.T) { func TestCreateUserEmailAlreadyUsed(t *testing.T) {

View File

@@ -35,6 +35,10 @@ func Auth(serviceName, userName, passwd string) (string, error) {
if err = t.Authenticate(0); err != nil { if err = t.Authenticate(0); err != nil {
return "", err return "", err
} }
if err = t.AcctMgmt(0); err != nil {
return "", err
}
// PAM login names might suffer transformations in the PAM stack. // PAM login names might suffer transformations in the PAM stack.
// We should take whatever the PAM stack returns for it. // We should take whatever the PAM stack returns for it.

View File

@@ -63,6 +63,7 @@ func EscapeControlBytes(text []byte) (EscapeStatus, []byte) {
func EscapeControlReader(text io.Reader, output io.Writer) (escaped EscapeStatus, err error) { func EscapeControlReader(text io.Reader, output io.Writer) (escaped EscapeStatus, err error) {
buf := make([]byte, 4096) buf := make([]byte, 4096)
readStart := 0 readStart := 0
runeCount := 0
var n int var n int
var writePos int var writePos int
@@ -79,6 +80,8 @@ readingloop:
for i < len(bs) { for i < len(bs) {
r, size := utf8.DecodeRune(bs[i:]) r, size := utf8.DecodeRune(bs[i:])
runeCount++
// Now handle the codepoints // Now handle the codepoints
switch { switch {
case r == utf8.RuneError: case r == utf8.RuneError:
@@ -113,6 +116,8 @@ readingloop:
lineHasRTLScript = false lineHasRTLScript = false
lineHasLTRScript = false lineHasLTRScript = false
case runeCount == 1 && r == 0xFEFF: // UTF BOM
// the first BOM is safe
case r == '\r' || r == '\t' || r == ' ': case r == '\r' || r == '\t' || r == ' ':
// These are acceptable control characters and space characters // These are acceptable control characters and space characters
case unicode.IsSpace(r): case unicode.IsSpace(r):
@@ -144,7 +149,8 @@ readingloop:
return return
} }
writePos = i + size writePos = i + size
case unicode.Is(unicode.C, r): // 65279 == BOM rune.
case unicode.Is(unicode.C, r) && r != rune(65279):
escaped.Escaped = true escaped.Escaped = true
escaped.HasControls = true escaped.HasControls = true
if writePos < i { if writePos < i {

View File

@@ -129,6 +129,14 @@ then resh (ר), and finally heh (ה) (which should appear leftmost).`,
"\n" + `if access_level != "user<span class="escaped-code-point" data-escaped="[U+202E]"><span class="char">` + "\u202e" + `</span></span> <span class="escaped-code-point" data-escaped="[U+2066]"><span class="char">` + "\u2066" + `</span></span>// Check if admin<span class="escaped-code-point" data-escaped="[U+2069]"><span class="char">` + "\u2069" + `</span></span> <span class="escaped-code-point" data-escaped="[U+2066]"><span class="char">` + "\u2066" + `</span></span>" {` + "\n", "\n" + `if access_level != "user<span class="escaped-code-point" data-escaped="[U+202E]"><span class="char">` + "\u202e" + `</span></span> <span class="escaped-code-point" data-escaped="[U+2066]"><span class="char">` + "\u2066" + `</span></span>// Check if admin<span class="escaped-code-point" data-escaped="[U+2069]"><span class="char">` + "\u2069" + `</span></span> <span class="escaped-code-point" data-escaped="[U+2066]"><span class="char">` + "\u2066" + `</span></span>" {` + "\n",
status: EscapeStatus{Escaped: true, HasBIDI: true, BadBIDI: true, HasLTRScript: true, HasRTLScript: true}, status: EscapeStatus{Escaped: true, HasBIDI: true, BadBIDI: true, HasLTRScript: true, HasRTLScript: true},
}, },
{
// UTF-8/16/32 all use the same codepoint for BOM
// Gitea could read UTF-16/32 content and convert into UTF-8 internally then render it, so we only process UTF-8 internally
name: "UTF BOM",
text: "\xef\xbb\xbftest",
result: "\xef\xbb\xbftest",
status: EscapeStatus{HasLTRScript: true},
},
} }
func TestEscapeControlString(t *testing.T) { func TestEscapeControlString(t *testing.T) {
@@ -163,10 +171,18 @@ func TestEscapeControlReader(t *testing.T) {
// lets add some control characters to the tests // lets add some control characters to the tests
tests := make([]escapeControlTest, 0, len(escapeControlTests)*3) tests := make([]escapeControlTest, 0, len(escapeControlTests)*3)
copy(tests, escapeControlTests) copy(tests, escapeControlTests)
// if there is a BOM, we should keep the BOM
addPrefix := func(prefix, s string) string {
if strings.HasPrefix(s, "\xef\xbb\xbf") {
return s[:3] + prefix + s[3:]
}
return prefix + s
}
for _, test := range escapeControlTests { for _, test := range escapeControlTests {
test.name += " (+Control)" test.name += " (+Control)"
test.text = "\u001E" + test.text test.text = addPrefix("\u001E", test.text)
test.result = `<span class="escaped-code-point" data-escaped="[U+001E]"><span class="char">` + "\u001e" + `</span></span>` + test.result test.result = addPrefix(`<span class="escaped-code-point" data-escaped="[U+001E]"><span class="char">`+"\u001e"+`</span></span>`, test.result)
test.status.Escaped = true test.status.Escaped = true
test.status.HasControls = true test.status.HasControls = true
tests = append(tests, test) tests = append(tests, test)
@@ -174,8 +190,8 @@ func TestEscapeControlReader(t *testing.T) {
for _, test := range escapeControlTests { for _, test := range escapeControlTests {
test.name += " (+Mark)" test.name += " (+Mark)"
test.text = "\u0300" + test.text test.text = addPrefix("\u0300", test.text)
test.result = `<span class="escaped-code-point" data-escaped="[U+0300]"><span class="char">` + "\u0300" + `</span></span>` + test.result test.result = addPrefix(`<span class="escaped-code-point" data-escaped="[U+0300]"><span class="char">`+"\u0300"+`</span></span>`, test.result)
test.status.Escaped = true test.status.Escaped = true
test.status.HasMarks = true test.status.HasMarks = true
tests = append(tests, test) tests = append(tests, test)

View File

@@ -266,7 +266,7 @@ func (ctx *Context) ServerError(logMsg string, logErr error) {
func (ctx *Context) serverErrorInternal(logMsg string, logErr error) { func (ctx *Context) serverErrorInternal(logMsg string, logErr error) {
if logErr != nil { if logErr != nil {
log.ErrorWithSkip(2, "%s: %v", logMsg, logErr) log.ErrorWithSkip(2, "%s: %v", logMsg, logErr)
if errors.Is(logErr, &net.OpError{}) { if _, ok := logErr.(*net.OpError); ok || errors.Is(logErr, &net.OpError{}) {
// This is an error within the underlying connection // This is an error within the underlying connection
// and further rendering will not work so just return // and further rendering will not work so just return
return return

View File

@@ -129,7 +129,23 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
// Team. // Team.
if ctx.Org.IsMember { if ctx.Org.IsMember {
shouldSeeAllTeams := false
if ctx.Org.IsOwner { if ctx.Org.IsOwner {
shouldSeeAllTeams = true
} else {
teams, err := org.GetUserTeams(ctx.User.ID)
if err != nil {
ctx.ServerError("GetUserTeams", err)
return
}
for _, team := range teams {
if team.IncludesAllRepositories && team.AccessMode >= perm.AccessModeAdmin {
shouldSeeAllTeams = true
break
}
}
}
if shouldSeeAllTeams {
ctx.Org.Teams, err = org.LoadTeams() ctx.Org.Teams, err = org.LoadTeams()
if err != nil { if err != nil {
ctx.ServerError("LoadTeams", err) ctx.ServerError("LoadTeams", err)

View File

@@ -911,7 +911,7 @@ func RepoRefByType(refType RepoRefType, ignoreNotExistErr ...bool) func(*Context
if refType == RepoRefLegacy { if refType == RepoRefLegacy {
// redirect from old URL scheme to new URL scheme // redirect from old URL scheme to new URL scheme
prefix := strings.TrimPrefix(setting.AppSubURL+strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*")), ctx.Repo.RepoLink) prefix := strings.TrimPrefix(setting.AppSubURL+strings.ToLower(strings.TrimSuffix(ctx.Req.URL.Path, ctx.Params("*"))), strings.ToLower(ctx.Repo.RepoLink))
ctx.Redirect(path.Join( ctx.Redirect(path.Join(
ctx.Repo.RepoLink, ctx.Repo.RepoLink,

View File

@@ -163,6 +163,8 @@ func (c *Command) RunWithContext(rc *RunContext) error {
fmt.Sprintf("LC_ALL=%s", DefaultLocale), fmt.Sprintf("LC_ALL=%s", DefaultLocale),
// avoid prompting for credentials interactively, supported since git v2.3 // avoid prompting for credentials interactively, supported since git v2.3
"GIT_TERMINAL_PROMPT=0", "GIT_TERMINAL_PROMPT=0",
// ignore replace references (https://git-scm.com/docs/git-replace)
"GIT_NO_REPLACE_OBJECTS=1",
) )
// TODO: verify if this is still needed in golang 1.15 // TODO: verify if this is still needed in golang 1.15

View File

@@ -191,7 +191,9 @@ func (c *CheckAttributeReader) Run() error {
} }
return nil return nil
}) })
if err != nil && c.ctx.Err() != nil && err.Error() != "signal: killed" { if err != nil && // If there is an error we need to return but:
c.ctx.Err() != err && // 1. Ignore the context error if the context is cancelled or exceeds the deadline (RunWithContext could return c.ctx.Err() which is Canceled or DeadlineExceeded)
err.Error() != "signal: killed" { // 2. We should not pass up errors due to the program being killed
return fmt.Errorf("failed to run attr-check. Error: %w\nStderr: %s", err, stdErr.String()) return fmt.Errorf("failed to run attr-check. Error: %w\nStderr: %s", err, stdErr.String())
} }
return nil return nil

View File

@@ -14,6 +14,8 @@ import (
"regexp" "regexp"
"strconv" "strconv"
"strings" "strings"
"code.gitea.io/gitea/modules/log"
) )
const ( const (
@@ -111,6 +113,17 @@ func (p Pointer) RelativePath() string {
return path.Join(p.Oid[0:2], p.Oid[2:4], p.Oid[4:]) return path.Join(p.Oid[0:2], p.Oid[2:4], p.Oid[4:])
} }
// ColorFormat provides a basic color format for a Team
func (p Pointer) ColorFormat(s fmt.State) {
if p.Oid == "" && p.Size == 0 {
log.ColorFprintf(s, "<empty>")
return
}
log.ColorFprintf(s, "%s:%d",
log.NewColoredIDValue(p.Oid),
p.Size)
}
// GeneratePointer generates a pointer for arbitrary content // GeneratePointer generates a pointer for arbitrary content
func GeneratePointer(content io.Reader) (Pointer, error) { func GeneratePointer(content io.Reader) (Pointer, error) {
h := sha256.New() h := sha256.New()

View File

@@ -99,7 +99,7 @@ var issueFullPatternOnce sync.Once
func getIssueFullPattern() *regexp.Regexp { func getIssueFullPattern() *regexp.Regexp {
issueFullPatternOnce.Do(func() { issueFullPatternOnce.Do(func() {
issueFullPattern = regexp.MustCompile(regexp.QuoteMeta(setting.AppURL) + issueFullPattern = regexp.MustCompile(regexp.QuoteMeta(setting.AppURL) +
`\w+/\w+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`) `[\w_.-]+/[\w_.-]+/(?:issues|pulls)/((?:\w{1,10}-)?[1-9][0-9]*)([\?|#](\S+)?)?\b`)
}) })
return issueFullPattern return issueFullPattern
} }

View File

@@ -95,6 +95,15 @@ func TestRender_CrossReferences(t *testing.T) {
test( test(
"/home/gitea/go-gitea/gitea#12345", "/home/gitea/go-gitea/gitea#12345",
`<p>/home/gitea/go-gitea/gitea#12345</p>`) `<p>/home/gitea/go-gitea/gitea#12345</p>`)
test(
util.URLJoin(TestAppURL, "gogitea", "gitea", "issues", "12345"),
`<p><a href="`+util.URLJoin(TestAppURL, "gogitea", "gitea", "issues", "12345")+`" class="ref-issue" rel="nofollow">gogitea/gitea#12345</a></p>`)
test(
util.URLJoin(TestAppURL, "go-gitea", "gitea", "issues", "12345"),
`<p><a href="`+util.URLJoin(TestAppURL, "go-gitea", "gitea", "issues", "12345")+`" class="ref-issue" rel="nofollow">go-gitea/gitea#12345</a></p>`)
test(
util.URLJoin(TestAppURL, "gogitea", "some-repo-name", "issues", "12345"),
`<p><a href="`+util.URLJoin(TestAppURL, "gogitea", "some-repo-name", "issues", "12345")+`" class="ref-issue" rel="nofollow">gogitea/some-repo-name#12345</a></p>`)
} }
func TestMisc_IsSameDomain(t *testing.T) { func TestMisc_IsSameDomain(t *testing.T) {

View File

@@ -5,10 +5,12 @@
package nosql package nosql
import ( import (
"fmt"
"path" "path"
"strconv" "strconv"
"strings" "strings"
"code.gitea.io/gitea/modules/log"
"github.com/syndtr/goleveldb/leveldb" "github.com/syndtr/goleveldb/leveldb"
"github.com/syndtr/goleveldb/leveldb/errors" "github.com/syndtr/goleveldb/leveldb/errors"
"github.com/syndtr/goleveldb/leveldb/opt" "github.com/syndtr/goleveldb/leveldb/opt"
@@ -20,8 +22,16 @@ func (m *Manager) CloseLevelDB(connection string) error {
defer m.mutex.Unlock() defer m.mutex.Unlock()
db, ok := m.LevelDBConnections[connection] db, ok := m.LevelDBConnections[connection]
if !ok { if !ok {
connection = ToLevelDBURI(connection).String() // Try the full URI
db, ok = m.LevelDBConnections[connection] uri := ToLevelDBURI(connection)
db, ok = m.LevelDBConnections[uri.String()]
if !ok {
// Try the datadir directly
dataDir := path.Join(uri.Host, uri.Path)
db, ok = m.LevelDBConnections[dataDir]
}
} }
if !ok { if !ok {
return nil return nil
@@ -40,6 +50,12 @@ func (m *Manager) CloseLevelDB(connection string) error {
// GetLevelDB gets a levelDB for a particular connection // GetLevelDB gets a levelDB for a particular connection
func (m *Manager) GetLevelDB(connection string) (*leveldb.DB, error) { func (m *Manager) GetLevelDB(connection string) (*leveldb.DB, error) {
// Convert the provided connection description to the common format
uri := ToLevelDBURI(connection)
// Get the datadir
dataDir := path.Join(uri.Host, uri.Path)
m.mutex.Lock() m.mutex.Lock()
defer m.mutex.Unlock() defer m.mutex.Unlock()
db, ok := m.LevelDBConnections[connection] db, ok := m.LevelDBConnections[connection]
@@ -48,12 +64,28 @@ func (m *Manager) GetLevelDB(connection string) (*leveldb.DB, error) {
return db.db, nil return db.db, nil
} }
uri := ToLevelDBURI(connection)
db = &levelDBHolder{ db, ok = m.LevelDBConnections[uri.String()]
name: []string{connection, uri.String()}, if ok {
db.count++
return db.db, nil
}
// if there is already a connection to this leveldb reuse that
// NOTE: if there differing options then only the first leveldb connection will be used
db, ok = m.LevelDBConnections[dataDir]
if ok {
db.count++
log.Warn("Duplicate connnection to level db: %s with different connection strings. Initial connection: %s. This connection: %s", dataDir, db.name[0], connection)
db.name = append(db.name, connection)
m.LevelDBConnections[connection] = db
return db.db, nil
}
db = &levelDBHolder{
name: []string{connection, uri.String(), dataDir},
} }
dataDir := path.Join(uri.Host, uri.Path)
opts := &opt.Options{} opts := &opt.Options{}
for k, v := range uri.Query() { for k, v := range uri.Query() {
switch replacer.Replace(strings.ToLower(k)) { switch replacer.Replace(strings.ToLower(k)) {
@@ -134,7 +166,11 @@ func (m *Manager) GetLevelDB(connection string) (*leveldb.DB, error) {
db.db, err = leveldb.OpenFile(dataDir, opts) db.db, err = leveldb.OpenFile(dataDir, opts)
if err != nil { if err != nil {
if !errors.IsCorrupted(err) { if !errors.IsCorrupted(err) {
return nil, err if strings.Contains(err.Error(), "resource temporarily unavailable") {
return nil, fmt.Errorf("unable to lock level db at %s: %w", dataDir, err)
}
return nil, fmt.Errorf("unable to open level db at %s: %w", dataDir, err)
} }
db.db, err = leveldb.RecoverFile(dataDir, opts) db.db, err = leveldb.RecoverFile(dataDir, opts)
if err != nil { if err != nil {

View File

@@ -204,7 +204,7 @@ func (ns *notificationService) NotifyPullRevieweDismiss(doer *user_model.User, r
} }
func (ns *notificationService) NotifyIssueChangeAssignee(doer *user_model.User, issue *models.Issue, assignee *user_model.User, removed bool, comment *models.Comment) { func (ns *notificationService) NotifyIssueChangeAssignee(doer *user_model.User, issue *models.Issue, assignee *user_model.User, removed bool, comment *models.Comment) {
if !removed { if !removed && doer.ID != assignee.ID {
var opts = issueNotificationOpts{ var opts = issueNotificationOpts{
IssueID: issue.ID, IssueID: issue.ID,
NotificationAuthorID: doer.ID, NotificationAuthorID: doer.ID,

View File

@@ -254,7 +254,7 @@ func SyncReleasesWithTags(repo *repo_model.Repository, gitRepo *git.Repository)
opts.Page = page opts.Page = page
rels, err := models.GetReleasesByRepoID(repo.ID, opts) rels, err := models.GetReleasesByRepoID(repo.ID, opts)
if err != nil { if err != nil {
return fmt.Errorf("GetReleasesByRepoID: %v", err) return fmt.Errorf("unable to GetReleasesByRepoID in Repo[%d:%s/%s]: %w", repo.ID, repo.OwnerName, repo.Name, err)
} }
if len(rels) == 0 { if len(rels) == 0 {
break break
@@ -265,11 +265,11 @@ func SyncReleasesWithTags(repo *repo_model.Repository, gitRepo *git.Repository)
} }
commitID, err := gitRepo.GetTagCommitID(rel.TagName) commitID, err := gitRepo.GetTagCommitID(rel.TagName)
if err != nil && !git.IsErrNotExist(err) { if err != nil && !git.IsErrNotExist(err) {
return fmt.Errorf("GetTagCommitID: %s: %v", rel.TagName, err) return fmt.Errorf("unable to GetTagCommitID for %q in Repo[%d:%s/%s]: %w", rel.TagName, repo.ID, repo.OwnerName, repo.Name, err)
} }
if git.IsErrNotExist(err) || commitID != rel.Sha1 { if git.IsErrNotExist(err) || commitID != rel.Sha1 {
if err := models.PushUpdateDeleteTag(repo, rel.TagName); err != nil { if err := models.PushUpdateDeleteTag(repo, rel.TagName); err != nil {
return fmt.Errorf("PushUpdateDeleteTag: %s: %v", rel.TagName, err) return fmt.Errorf("unable to PushUpdateDeleteTag: %q in Repo[%d:%s/%s]: %w", rel.TagName, repo.ID, repo.OwnerName, repo.Name, err)
} }
} else { } else {
existingRelTags[strings.ToLower(rel.TagName)] = struct{}{} existingRelTags[strings.ToLower(rel.TagName)] = struct{}{}
@@ -278,12 +278,12 @@ func SyncReleasesWithTags(repo *repo_model.Repository, gitRepo *git.Repository)
} }
tags, err := gitRepo.GetTags(0, 0) tags, err := gitRepo.GetTags(0, 0)
if err != nil { if err != nil {
return fmt.Errorf("GetTags: %v", err) return fmt.Errorf("unable to GetTags in Repo[%d:%s/%s]: %w", repo.ID, repo.OwnerName, repo.Name, err)
} }
for _, tagName := range tags { for _, tagName := range tags {
if _, ok := existingRelTags[strings.ToLower(tagName)]; !ok { if _, ok := existingRelTags[strings.ToLower(tagName)]; !ok {
if err := PushUpdateAddTag(repo, gitRepo, tagName); err != nil { if err := PushUpdateAddTag(repo, gitRepo, tagName); err != nil {
return fmt.Errorf("pushUpdateAddTag: %v", err) return fmt.Errorf("unable to PushUpdateAddTag: %q to Repo[%d:%s/%s]: %w", tagName, repo.ID, repo.OwnerName, repo.Name, err)
} }
} }
} }
@@ -294,11 +294,11 @@ func SyncReleasesWithTags(repo *repo_model.Repository, gitRepo *git.Repository)
func PushUpdateAddTag(repo *repo_model.Repository, gitRepo *git.Repository, tagName string) error { func PushUpdateAddTag(repo *repo_model.Repository, gitRepo *git.Repository, tagName string) error {
tag, err := gitRepo.GetTag(tagName) tag, err := gitRepo.GetTag(tagName)
if err != nil { if err != nil {
return fmt.Errorf("GetTag: %v", err) return fmt.Errorf("unable to GetTag: %w", err)
} }
commit, err := tag.Commit(gitRepo) commit, err := tag.Commit(gitRepo)
if err != nil { if err != nil {
return fmt.Errorf("Commit: %v", err) return fmt.Errorf("unable to get tag Commit: %w", err)
} }
sig := tag.Tagger sig := tag.Tagger
@@ -315,14 +315,14 @@ func PushUpdateAddTag(repo *repo_model.Repository, gitRepo *git.Repository, tagN
if sig != nil { if sig != nil {
author, err = user_model.GetUserByEmail(sig.Email) author, err = user_model.GetUserByEmail(sig.Email)
if err != nil && !user_model.IsErrUserNotExist(err) { if err != nil && !user_model.IsErrUserNotExist(err) {
return fmt.Errorf("GetUserByEmail: %v", err) return fmt.Errorf("unable to GetUserByEmail for %q: %w", sig.Email, err)
} }
createdAt = sig.When createdAt = sig.When
} }
commitsCount, err := commit.CommitsCount() commitsCount, err := commit.CommitsCount()
if err != nil { if err != nil {
return fmt.Errorf("CommitsCount: %v", err) return fmt.Errorf("unable to get CommitsCount: %w", err)
} }
var rel = models.Release{ var rel = models.Release{
@@ -359,14 +359,14 @@ func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *repo_model.Re
_, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: p, RepositoryID: repo.ID}) _, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: p, RepositoryID: repo.ID})
if err != nil { if err != nil {
log.Error("Error creating LFS meta object %v: %v", p, err) log.Error("Repo[%-v]: Error creating LFS meta object %-v: %v", repo, p, err)
return err return err
} }
if err := contentStore.Put(p, content); err != nil { if err := contentStore.Put(p, content); err != nil {
log.Error("Error storing content for LFS meta object %v: %v", p, err) log.Error("Repo[%-v]: Error storing content for LFS meta object %-v: %v", repo, p, err)
if _, err2 := models.RemoveLFSMetaObjectByOid(repo.ID, p.Oid); err2 != nil { if _, err2 := models.RemoveLFSMetaObjectByOid(repo.ID, p.Oid); err2 != nil {
log.Error("Error removing LFS meta object %v: %v", p, err2) log.Error("Repo[%-v]: Error removing LFS meta object %-v: %v", repo, p, err2)
} }
return err return err
} }
@@ -386,32 +386,32 @@ func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *repo_model.Re
for pointerBlob := range pointerChan { for pointerBlob := range pointerChan {
meta, err := models.GetLFSMetaObjectByOid(repo.ID, pointerBlob.Oid) meta, err := models.GetLFSMetaObjectByOid(repo.ID, pointerBlob.Oid)
if err != nil && err != models.ErrLFSObjectNotExist { if err != nil && err != models.ErrLFSObjectNotExist {
log.Error("Error querying LFS meta object %v: %v", pointerBlob.Pointer, err) log.Error("Repo[%-v]: Error querying LFS meta object %-v: %v", repo, pointerBlob.Pointer, err)
return err return err
} }
if meta != nil { if meta != nil {
log.Trace("Skipping unknown LFS meta object %v", pointerBlob.Pointer) log.Trace("Repo[%-v]: Skipping unknown LFS meta object %-v", repo, pointerBlob.Pointer)
continue continue
} }
log.Trace("LFS object %v not present in repository %s", pointerBlob.Pointer, repo.FullName()) log.Trace("Repo[%-v]: LFS object %-v not present in repository", repo, pointerBlob.Pointer)
exist, err := contentStore.Exists(pointerBlob.Pointer) exist, err := contentStore.Exists(pointerBlob.Pointer)
if err != nil { if err != nil {
log.Error("Error checking if LFS object %v exists: %v", pointerBlob.Pointer, err) log.Error("Repo[%-v]: Error checking if LFS object %-v exists: %v", repo, pointerBlob.Pointer, err)
return err return err
} }
if exist { if exist {
log.Trace("LFS object %v already present; creating meta object", pointerBlob.Pointer) log.Trace("Repo[%-v]: LFS object %-v already present; creating meta object", repo, pointerBlob.Pointer)
_, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: pointerBlob.Pointer, RepositoryID: repo.ID}) _, err := models.NewLFSMetaObject(&models.LFSMetaObject{Pointer: pointerBlob.Pointer, RepositoryID: repo.ID})
if err != nil { if err != nil {
log.Error("Error creating LFS meta object %v: %v", pointerBlob.Pointer, err) log.Error("Repo[%-v]: Error creating LFS meta object %-v: %v", repo, pointerBlob.Pointer, err)
return err return err
} }
} else { } else {
if setting.LFS.MaxFileSize > 0 && pointerBlob.Size > setting.LFS.MaxFileSize { if setting.LFS.MaxFileSize > 0 && pointerBlob.Size > setting.LFS.MaxFileSize {
log.Info("LFS object %v download denied because of LFS_MAX_FILE_SIZE=%d < size %d", pointerBlob.Pointer, setting.LFS.MaxFileSize, pointerBlob.Size) log.Info("Repo[%-v]: LFS object %-v download denied because of LFS_MAX_FILE_SIZE=%d < size %d", repo, pointerBlob.Pointer, setting.LFS.MaxFileSize, pointerBlob.Size)
continue continue
} }
@@ -432,7 +432,7 @@ func StoreMissingLfsObjectsInRepository(ctx context.Context, repo *repo_model.Re
err, has := <-errChan err, has := <-errChan
if has { if has {
log.Error("Error enumerating LFS objects for repository: %v", err) log.Error("Repo[%-v]: Error enumerating LFS objects for repository: %v", repo, err)
return err return err
} }

View File

@@ -6,18 +6,21 @@ package storage
import ( import (
"context" "context"
"errors"
"io" "io"
"net/url" "net/url"
"os" "os"
"path"
"path/filepath" "path/filepath"
"strings"
"code.gitea.io/gitea/modules/log" "code.gitea.io/gitea/modules/log"
"code.gitea.io/gitea/modules/util" "code.gitea.io/gitea/modules/util"
) )
var ( // ErrLocalPathNotSupported represents an error that path is not supported
_ ObjectStorage = &LocalStorage{} var ErrLocalPathNotSupported = errors.New("local path is not supported")
) var _ ObjectStorage = &LocalStorage{}
// LocalStorageType is the type descriptor for local storage // LocalStorageType is the type descriptor for local storage
const LocalStorageType Type = "local" const LocalStorageType Type = "local"
@@ -61,11 +64,18 @@ func NewLocalStorage(ctx context.Context, cfg interface{}) (ObjectStorage, error
// Open a file // Open a file
func (l *LocalStorage) Open(path string) (Object, error) { func (l *LocalStorage) Open(path string) (Object, error) {
if !isLocalPathValid(path) {
return nil, ErrLocalPathNotSupported
}
return os.Open(filepath.Join(l.dir, path)) return os.Open(filepath.Join(l.dir, path))
} }
// Save a file // Save a file
func (l *LocalStorage) Save(path string, r io.Reader, size int64) (int64, error) { func (l *LocalStorage) Save(path string, r io.Reader, size int64) (int64, error) {
if !isLocalPathValid(path) {
return 0, ErrLocalPathNotSupported
}
p := filepath.Join(l.dir, path) p := filepath.Join(l.dir, path)
if err := os.MkdirAll(filepath.Dir(p), os.ModePerm); err != nil { if err := os.MkdirAll(filepath.Dir(p), os.ModePerm); err != nil {
return 0, err return 0, err
@@ -109,8 +119,19 @@ func (l *LocalStorage) Stat(path string) (os.FileInfo, error) {
return os.Stat(filepath.Join(l.dir, path)) return os.Stat(filepath.Join(l.dir, path))
} }
func isLocalPathValid(p string) bool {
a := path.Clean(p)
if strings.HasPrefix(a, "../") || strings.HasPrefix(a, "..\\") {
return false
}
return a == p
}
// Delete delete a file // Delete delete a file
func (l *LocalStorage) Delete(path string) error { func (l *LocalStorage) Delete(path string) error {
if !isLocalPathValid(path) {
return ErrLocalPathNotSupported
}
p := filepath.Join(l.dir, path) p := filepath.Join(l.dir, path)
return util.Remove(p) return util.Remove(p)
} }

View File

@@ -0,0 +1,45 @@
// Copyright 2022 The Gitea Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package storage
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestLocalPathIsValid(t *testing.T) {
kases := []struct {
path string
valid bool
}{
{
"a/0/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14",
true,
},
{
"../a/0/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14",
false,
},
{
"a\\0\\a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14",
true,
},
{
"b/../a/0/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14",
false,
},
{
"..\\a/0/a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14",
false,
},
}
for _, k := range kases {
t.Run(k.path, func(t *testing.T) {
assert.EqualValues(t, k.valid, isLocalPathValid(k.path))
})
}
}

View File

@@ -41,6 +41,7 @@ webauthn_use_twofa=Zwei-Faktor-Authentifizierung via Handy verwenden
webauthn_error=Dein Sicherheitsschlüssel konnte nicht gelesen werden. webauthn_error=Dein Sicherheitsschlüssel konnte nicht gelesen werden.
webauthn_unsupported_browser=Dein Browser unterstützt derzeit keinen WebAuthn. webauthn_unsupported_browser=Dein Browser unterstützt derzeit keinen WebAuthn.
webauthn_error_unknown=Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut. webauthn_error_unknown=Ein unbekannter Fehler ist aufgetreten. Bitte versuche es erneut.
webauthn_error_insecure=WebAuthn unterstützt nur sichere Verbindungen. Zum Testen über HTTP kannst du "localhost" oder "127.0.0.1" als Host verwenden
webauthn_error_unable_to_process=Der Server konnte deine Anfrage nicht bearbeiten. webauthn_error_unable_to_process=Der Server konnte deine Anfrage nicht bearbeiten.
webauthn_error_duplicated=Für diese Anfrage ist der Sicherheitsschlüssel nicht erlaubt. Bitte stell sicher, dass er nicht bereits registriert ist. webauthn_error_duplicated=Für diese Anfrage ist der Sicherheitsschlüssel nicht erlaubt. Bitte stell sicher, dass er nicht bereits registriert ist.
webauthn_error_timeout=Das Zeitlimit wurde erreicht, bevor dein Schlüssel gelesen werden konnte. Bitte lade die Seite erneut. webauthn_error_timeout=Das Zeitlimit wurde erreicht, bevor dein Schlüssel gelesen werden konnte. Bitte lade die Seite erneut.
@@ -140,6 +141,7 @@ charset=Zeichensatz
path=Pfad path=Pfad
sqlite_helper=Dateipfad zur SQLite3 Datenbank.<br>Gebe einen absoluten Pfad an, wenn Gitea als Service gestartet wird. sqlite_helper=Dateipfad zur SQLite3 Datenbank.<br>Gebe einen absoluten Pfad an, wenn Gitea als Service gestartet wird.
reinstall_error=Du versuchst, in eine bereits existierende Gitea Datenbank zu installieren reinstall_error=Du versuchst, in eine bereits existierende Gitea Datenbank zu installieren
reinstall_confirm_message=Eine Neuinstallation mit einer bestehenden Gitea-Datenbank kann mehrere Probleme verursachen. In den meisten Fällen solltest du deine vorhandene "app.ini" verwenden, um Gitea auszuführen. Wenn du weist, was du tust, bestätigen die folgenden Angaben:
reinstall_confirm_check_3=Du bestätigst, dass du absolut sicher bist, dass diese Gitea mit der richtigen app.ini läuft, und du sicher bist, dass du neu installieren musst. Du bestätigst, dass du die oben genannten Risiken anerkennst. reinstall_confirm_check_3=Du bestätigst, dass du absolut sicher bist, dass diese Gitea mit der richtigen app.ini läuft, und du sicher bist, dass du neu installieren musst. Du bestätigst, dass du die oben genannten Risiken anerkennst.
err_empty_db_path=Der SQLite3 Datenbankpfad darf nicht leer sein. err_empty_db_path=Der SQLite3 Datenbankpfad darf nicht leer sein.
no_admin_and_disable_registration=Du kannst Selbst-Registrierungen nicht deaktivieren, ohne ein Administratorkonto zu erstellen. no_admin_and_disable_registration=Du kannst Selbst-Registrierungen nicht deaktivieren, ohne ein Administratorkonto zu erstellen.
@@ -2050,8 +2052,8 @@ settings.lfs_pointers.accessible=Nutzer hat Zugriff
settings.lfs_pointers.associateAccessible=Ordne %d zugängliche OIDs zu settings.lfs_pointers.associateAccessible=Ordne %d zugängliche OIDs zu
settings.rename_branch_failed_exist=Kann den Branch nicht umbenennen, da der Zielbranch %s bereits existiert. settings.rename_branch_failed_exist=Kann den Branch nicht umbenennen, da der Zielbranch %s bereits existiert.
settings.rename_branch_failed_not_exist=Kann den Branch %s nicht umbenennen, da er nicht existiert. settings.rename_branch_failed_not_exist=Kann den Branch %s nicht umbenennen, da er nicht existiert.
settings.rename_branch_success=Zweig %s wurde erfolgreich in %s umbenannt. settings.rename_branch_success=Branch %s wurde erfolgreich in %s umbenannt.
settings.rename_branch_from=alter Zweigname settings.rename_branch_from=alter Branchname
settings.rename_branch_to=neuer Branchname settings.rename_branch_to=neuer Branchname
settings.rename_branch=Branch umbennen settings.rename_branch=Branch umbennen

View File

@@ -34,6 +34,20 @@ twofa=Έλεγχος Ταυτότητας Δύο Παραγόντων
twofa_scratch=Κωδικός Μίας Χρήσης Δύο Παραγόντων twofa_scratch=Κωδικός Μίας Χρήσης Δύο Παραγόντων
passcode=Κωδικός passcode=Κωδικός
webauthn_insert_key=Εισάγετε το κλειδί ασφαλείας σας
webauthn_sign_in=Πατήστε το κουμπί στο κλειδί ασφαλείας. Αν το κλειδί ασφαλείας σας δεν έχει κουμπί, τοποθετήστε το ξανά.
webauthn_press_button=Παρακαλώ πατήστε το κουμπί στο κλειδί ασφαλείας…
webauthn_use_twofa=Χρησιμοποιήστε έναν κωδικό δύο παραγόντων από το τηλέφωνό σας
webauthn_error=Αδύνατη η ανάγνωση του κλειδιού ασφαλείας.
webauthn_unsupported_browser=Το πρόγραμμα περιήγησής σας δεν υποστηρίζει επί του παρόντος WebAuthn.
webauthn_error_unknown=Παρουσιάστηκε ένα άγνωστο σφάλμα. Παρακαλώ προσπαθήστε ξανά.
webauthn_error_insecure=Το WebAuthn υποστηρίζει μόνο ασφαλείς συνδέσεις. Για δοκιμές πάνω από HTTP, μπορείτε να χρησιμοποιήσετε την προέλευση "localhost" ή "127.0.0.1"
webauthn_error_unable_to_process=Ο διακομιστής δεν μπόρεσε να επεξεργαστεί το αίτημά σας.
webauthn_error_duplicated=Το κλειδί ασφαλείας δεν επιτρέπεται για αυτό το αίτημα. Βεβαιωθείτε ότι το κλειδί δεν έχει ήδη καταχωρηθεί.
webauthn_error_empty=Πρέπει να ορίσετε ένα όνομα για αυτό το κλειδί.
webauthn_error_timeout=Το χρονικό όριο έφτασε πριν το κλειδί να διαβαστεί. Παρακαλώ ανανεώστε τη σελίδα και προσπαθήστε ξανά.
webauthn_u2f_deprecated=Το κλειδί: '%s' πιστοποιεί χρησιμοποιώντας το παρωχημένο πρωτόκολλο U2F. Θα πρέπει να καταχωρήσετε ξανά αυτό το κλειδί και να καταργήσετε την παλιά εγγραφή.
webauthn_reload=Ανανέωση
repository=Αποθετήριο repository=Αποθετήριο
organization=Οργανισμός organization=Οργανισμός
@@ -305,6 +319,9 @@ oauth_signup_submit=Ολοκληρωμένος Λογαριασμός
oauth_signin_tab=Σύνδεση με υπάρχων λογαριασμό oauth_signin_tab=Σύνδεση με υπάρχων λογαριασμό
oauth_signin_title=Συνδεθείτε για να εγκρίνετε τον Συνδεδεμένο Λογαριασμό oauth_signin_title=Συνδεθείτε για να εγκρίνετε τον Συνδεδεμένο Λογαριασμό
oauth_signin_submit=Σύνδεση Λογαριασμού oauth_signin_submit=Σύνδεση Λογαριασμού
oauth.signin.error=Παρουσιάστηκε σφάλμα κατά την επεξεργασία του αιτήματος εξουσιοδότησης. Εάν αυτό το σφάλμα επιμένει, παρακαλούμε επικοινωνήστε με το διαχειριστή του ιστοτόπου.
oauth.signin.error.access_denied=Η αίτηση εξουσιοδότησης απορρίφθηκε.
oauth.signin.error.temporarily_unavailable=Η εξουσιοδότηση απέτυχε επειδή ο διακομιστής ταυτοποίησης δεν είναι διαθέσιμος προσωρινά. Παρακαλώ προσπαθήστε ξανά αργότερα.
openid_connect_submit=Σύνδεση openid_connect_submit=Σύνδεση
openid_connect_title=Σύνδεση σε υπάρχων λογαριασμό openid_connect_title=Σύνδεση σε υπάρχων λογαριασμό
openid_connect_desc=Το επιλεγμένο OpenID URI είναι άγνωστο. Συνδέστε το με ένα νέο λογαριασμό εδώ. openid_connect_desc=Το επιλεγμένο OpenID URI είναι άγνωστο. Συνδέστε το με ένα νέο λογαριασμό εδώ.
@@ -510,6 +527,7 @@ twofa=Έλεγχος Ταυτότητας Δύο Παραγόντων
account_link=Συνδεδεμένοι Λογαριασμοί account_link=Συνδεδεμένοι Λογαριασμοί
organization=Οργανισμοί organization=Οργανισμοί
uid=Uid uid=Uid
webauthn=Κλειδιά Ασφαλείας
public_profile=Δημόσιο Προφίλ public_profile=Δημόσιο Προφίλ
biography_placeholder=Πείτε μας λίγο για τον εαυτό σας biography_placeholder=Πείτε μας λίγο για τον εαυτό σας
@@ -531,6 +549,7 @@ continue=Συνέχεια
cancel=Ακύρωση cancel=Ακύρωση
language=Γλώσσα language=Γλώσσα
ui=Θέμα Διεπαφής ui=Θέμα Διεπαφής
saved_successfully=Οι ρυθμίσεις σας αποθηκεύτηκαν επιτυχώς.
privacy=Απόρρητο privacy=Απόρρητο
keep_activity_private=Απόκρυψη της δραστηριότητας σας από τη σελίδα προφίλ keep_activity_private=Απόκρυψη της δραστηριότητας σας από τη σελίδα προφίλ
keep_activity_private_popup=Με αυτή την επιλογή η δραστηριότητα σας είναι ορατή μόνο σε εσάς και τους διαχειριστές keep_activity_private_popup=Με αυτή την επιλογή η δραστηριότητα σας είναι ορατή μόνο σε εσάς και τους διαχειριστές
@@ -730,6 +749,11 @@ passcode_invalid=Ο κωδικός είναι λάθος. Δοκιμάστε ξ
twofa_enrolled=Ο λογαριασμός σας έχει εγγραφεί σε ταυτοποίηση δύο παραγόντων. Αποθηκεύστε το διακριτικό μιας χρήσης (%s) σε ασφαλές μέρος καθώς εμφανίζεται μόνο μία φορά! twofa_enrolled=Ο λογαριασμός σας έχει εγγραφεί σε ταυτοποίηση δύο παραγόντων. Αποθηκεύστε το διακριτικό μιας χρήσης (%s) σε ασφαλές μέρος καθώς εμφανίζεται μόνο μία φορά!
twofa_failed_get_secret=Αποτυχία λήψης μυστικού. twofa_failed_get_secret=Αποτυχία λήψης μυστικού.
webauthn_desc=Τα κλειδιά ασφαλείας είναι συσκευές που περιέχουν κρυπτογραφικά κλειδιά. Μπορούν να χρησιμοποιηθούν για έλεγχο ταυτότητας δύο παραγόντων. Τα κλειδιά ασφαλείας πρέπει να υποστηρίζουν το <a rel="noreferrer" target="_blank" href="https://w3c.github.io/webauthn/#webauthn-authenticator">πρότυπο WebAuthn Authn Authenticator</a>.
webauthn_register_key=Προσθήκη Κλειδιού Ασφαλείας
webauthn_nickname=Ψευδώνυμο
webauthn_delete_key=Αφαίρεση Κλειδιού Ασφαλείας
webauthn_delete_key_desc=Αν αφαιρέσετε ένα κλειδί ασφαλείας δεν μπορείτε πλέον να συνδεθείτε με αυτό. Συνέχεια;
manage_account_links=Διαχείριση Συνδεδεμένων Λογαριασμών manage_account_links=Διαχείριση Συνδεδεμένων Λογαριασμών
manage_account_links_desc=Αυτοί οι εξωτερικοί λογαριασμοί είναι συνδεδεμένοι στον Gitea λογαριασμό σας. manage_account_links_desc=Αυτοί οι εξωτερικοί λογαριασμοί είναι συνδεδεμένοι στον Gitea λογαριασμό σας.
@@ -986,7 +1010,16 @@ file_view_rendered=Προβολή Απόδοσης
file_view_raw=Προβολή Ακατέργαστου file_view_raw=Προβολή Ακατέργαστου
file_permalink=Permalink file_permalink=Permalink
file_too_large=Το αρχείο είναι πολύ μεγάλο για να εμφανιστεί. file_too_large=Το αρχείο είναι πολύ μεγάλο για να εμφανιστεί.
bidi_bad_header=`Αυτό το αρχείο περιέχει μη αναμενόμενους χαρακτήρες Unicode!`
bidi_bad_description=`Αυτό το αρχείο περιέχει μη αναμενόμενους χαρακτήρες Bidirectional Unicode που ίσως να επεξεργάζονται διαφορετικά από ότι εμφανίζεται παρακάτω. Αν η χρήση αυτή είναι σκόπιμη και νόμιμη, μπορείτε να αγνοήσετε με ασφάλεια αυτή την προειδοποίηση. Χρησιμοποιήστε το κουμπί Escape για να αποκαλύψετε κρυμμένους χαρακτήρες.`
bidi_bad_description_escaped=`Αυτό το αρχείο περιέχει μη αναμενόμενους χαρακτήρες Bidirectional Unicode. Οι κρυμμένοι χαρακτήρες unicode εμφανίζονται κωδικοποιημένοι παρακάτω. Χρησιμοποιήστε το κουμπί Unescape για να δείτε πώς αποδίδονται.`
unicode_header=`Αυτό το αρχείο περιέχει κρυφούς χαρακτήρες Unicode!`
unicode_description=`Αυτό το αρχείο περιέχει κρυφούς χαρακτήρες Unicode που μπορεί να επεξεργάζονται διαφορετικά από όπως εμφανίζονται παρακάτω. Αν η χρήση είναι σκόπιμη και νόμιμη, μπορείτε να αγνοήσετε με ασφάλεια αυτή την προειδοποίηση. Χρησιμοποιήστε το κουμπί Escape για να αποκαλύψετε τους κρυφούς χαρακτήρες.`
unicode_description_escaped=`Αυτό το αρχείο περιέχει κρυφούς χαρακτήρες Unicode. Οι κρυφοί χαρακτήρες unicode εμφανίζονται κωδικοποιημένοι παρακάτω. Χρησιμοποιήστε το κουμπί Unescape για να δείτε πώς αποδίδονται.`
line_unicode=`Αυτή η γραμμή έχει κρυφούς χαρακτήρες unicode`
escape_control_characters=Escape
unescape_control_characters=Unescape
file_copy_permalink=Αντιγραφή Permalink file_copy_permalink=Αντιγραφή Permalink
video_not_supported_in_browser=Το πρόγραμμα περιήγησής σας δεν υποστηρίζει την ετικέτα HTML5 'video'. video_not_supported_in_browser=Το πρόγραμμα περιήγησής σας δεν υποστηρίζει την ετικέτα HTML5 'video'.
audio_not_supported_in_browser=Το πρόγραμμα περιήγησής σας δεν υποστηρίζει την ετικέτα HTML5 'audio'. audio_not_supported_in_browser=Το πρόγραμμα περιήγησής σας δεν υποστηρίζει την ετικέτα HTML5 'audio'.
@@ -1081,6 +1114,8 @@ commits.signed_by_untrusted_user_unmatched=Υπογράφηκε από ένα μ
commits.gpg_key_id=ID Κλειδιού GPG commits.gpg_key_id=ID Κλειδιού GPG
commits.ssh_key_fingerprint=Αποτύπωμα Κλειδιού SSH commits.ssh_key_fingerprint=Αποτύπωμα Κλειδιού SSH
ext_issues=Πρόσβαση στα Εξωτερικά Ζητήματα
ext_issues.desc=Σύνδεση σε εξωτερικό εφαρμογή ζητημάτων. ext_issues.desc=Σύνδεση σε εξωτερικό εφαρμογή ζητημάτων.
projects=Έργα projects=Έργα
@@ -1560,6 +1595,7 @@ signing.wont_sign.commitssigned=Η συγχώνευση δεν θα υπογρα
signing.wont_sign.approved=Η συγχώνευση δεν θα υπογραφεί καθώς το PR δεν εγκρίνεται signing.wont_sign.approved=Η συγχώνευση δεν θα υπογραφεί καθώς το PR δεν εγκρίνεται
signing.wont_sign.not_signed_in=Δεν είστε συνδεδεμένοι signing.wont_sign.not_signed_in=Δεν είστε συνδεδεμένοι
ext_wiki=Πρόσβαση στο Εξωτερικό Wiki
ext_wiki.desc=Σύνδεση σε ένα εξωτερικό wiki. ext_wiki.desc=Σύνδεση σε ένα εξωτερικό wiki.
wiki=Wiki wiki=Wiki
@@ -1816,6 +1852,8 @@ settings.webhook.response=Απάντηση
settings.webhook.headers=Κεφαλίδες settings.webhook.headers=Κεφαλίδες
settings.webhook.payload=Περιεχόμενο settings.webhook.payload=Περιεχόμενο
settings.webhook.body=Σώμα settings.webhook.body=Σώμα
settings.webhook.replay.description=Επανάληψη αυτού του webhook.
settings.webhook.delivery.success=Ένα γεγονός έχει προστεθεί στην ουρά παράδοσης. Μπορεί να χρειαστούν λίγα δευτερόλεπτα μέχρι να εμφανιστεί στο ιστορικό.
settings.githooks_desc=Τα Άγκιστρα Git παρέχονται από το ίδιο το Git. Μπορείτε να επεξεργαστείτε τα αρχεία αγκίστρων παρακάτω για να ρυθμίσετε προσαρμοσμένες λειτουργίες. settings.githooks_desc=Τα Άγκιστρα Git παρέχονται από το ίδιο το Git. Μπορείτε να επεξεργαστείτε τα αρχεία αγκίστρων παρακάτω για να ρυθμίσετε προσαρμοσμένες λειτουργίες.
settings.githook_edit_desc=Αν το hook είναι ανενεργό, θα παρουσιαστεί ένα παράδειγμα. Αφήνοντας το περιεχόμενο του hook κενό θα το απενεργοποιήσετε. settings.githook_edit_desc=Αν το hook είναι ανενεργό, θα παρουσιαστεί ένα παράδειγμα. Αφήνοντας το περιεχόμενο του hook κενό θα το απενεργοποιήσετε.
settings.githook_name=Όνομα Hook settings.githook_name=Όνομα Hook
@@ -2079,6 +2117,7 @@ diff.protected=Προστατευμένο
diff.image.side_by_side=Δίπλα Δίπλα diff.image.side_by_side=Δίπλα Δίπλα
diff.image.swipe=Σύρσιμο diff.image.swipe=Σύρσιμο
diff.image.overlay=Επικάλυψη diff.image.overlay=Επικάλυψη
diff.has_escaped=Αυτή η γραμμή έχει κρυφούς χαρακτήρες Unicode
releases.desc=Παρακολούθηση εκδόσεων έργου και λήψεων. releases.desc=Παρακολούθηση εκδόσεων έργου και λήψεων.
release.releases=Κυκλοφορίες release.releases=Κυκλοφορίες
@@ -2154,6 +2193,7 @@ branch.new_branch_from=Δημιουργία νέου κλάδου από '%s'
branch.renamed=Ο κλάδος %s μετονομάστηκε σε %s. branch.renamed=Ο κλάδος %s μετονομάστηκε σε %s.
tag.create_tag=Δημιουργία ετικέτας <strong>%s</strong> tag.create_tag=Δημιουργία ετικέτας <strong>%s</strong>
tag.create_success=Η ετικέτα '%s' έχει δημιουργηθεί. tag.create_success=Η ετικέτα '%s' έχει δημιουργηθεί.
topic.manage_topics=Διαχείριση Θεμάτων topic.manage_topics=Διαχείριση Θεμάτων
@@ -2240,7 +2280,13 @@ teams.leave=Αποχώρηση
teams.leave.detail=Αποχώρηση από %s; teams.leave.detail=Αποχώρηση από %s;
teams.can_create_org_repo=Δημιουργία αποθετηρίων teams.can_create_org_repo=Δημιουργία αποθετηρίων
teams.can_create_org_repo_helper=Τα μέλη μπορούν να δημιουργήσουν νέα αποθετήρια στον οργανισμό. Ο δημιουργός θα αποκτήσει πρόσβαση διαχειριστή στο νέο αποθετήριο. teams.can_create_org_repo_helper=Τα μέλη μπορούν να δημιουργήσουν νέα αποθετήρια στον οργανισμό. Ο δημιουργός θα αποκτήσει πρόσβαση διαχειριστή στο νέο αποθετήριο.
teams.none_access=Καμία Πρόσβαση
teams.none_access_helper=Τα μέλη δεν μπορούν να δουν ή να κάνουν οποιαδήποτε άλλη ενέργεια σε αυτή τη μονάδα.
teams.general_access=Γενική Πρόσβαση
teams.general_access_helper=Τα δικαιώματα των μελών αποφασίζονται από το παρακάτω πίνακα αδειών.
teams.read_access=Ανάγνωση
teams.read_access_helper=Τα μέλη μπορούν να δουν και να κλωνοποιήσουν τα αποθετήρια της ομάδας. teams.read_access_helper=Τα μέλη μπορούν να δουν και να κλωνοποιήσουν τα αποθετήρια της ομάδας.
teams.write_access=Εγγραφή
teams.write_access_helper=Τα μέλη μπορούν να δουν και να κλωνοποιήσουν τα αποθετήρια της ομάδας. teams.write_access_helper=Τα μέλη μπορούν να δουν και να κλωνοποιήσουν τα αποθετήρια της ομάδας.
teams.admin_access=Πρόσβαση Διαχειριστή teams.admin_access=Πρόσβαση Διαχειριστή
teams.admin_access_helper=Τα μέλη μπορούν να κάνουν push και pull στα αποθετήρια της ομάδας όπως και να προσθέσουν συνεργάτες σε αυτά. teams.admin_access_helper=Τα μέλη μπορούν να κάνουν push και pull στα αποθετήρια της ομάδας όπως και να προσθέσουν συνεργάτες σε αυτά.
@@ -2869,6 +2915,7 @@ error.probable_bad_signature=ΠΡΟΣΟΧΗ! Αν και υπάρχει ένα
error.probable_bad_default_signature=ΠΡΟΣΟΧΗ! Αν και το προεπιλεγμένο κλειδί έχει αυτό το ID, δεν επαληθεύει αυτή την υποβολή! Αυτή η υποβολή είναι ΥΠΟΠΤΗ. error.probable_bad_default_signature=ΠΡΟΣΟΧΗ! Αν και το προεπιλεγμένο κλειδί έχει αυτό το ID, δεν επαληθεύει αυτή την υποβολή! Αυτή η υποβολή είναι ΥΠΟΠΤΗ.
[units] [units]
unit=Μονάδα
error.no_unit_allowed_repo=Δεν σας επιτρέπεται να έχετε πρόσβαση σε οποιαδήποτε ενότητα αυτού του αποθετηρίου. error.no_unit_allowed_repo=Δεν σας επιτρέπεται να έχετε πρόσβαση σε οποιαδήποτε ενότητα αυτού του αποθετηρίου.
error.unit_not_allowed=Δεν σας επιτρέπεται να έχετε πρόσβαση σε αυτήν την ενότητα αποθετηρίου. error.unit_not_allowed=Δεν σας επιτρέπεται να έχετε πρόσβαση σε αυτήν την ενότητα αποθετηρίου.

View File

@@ -34,6 +34,20 @@ twofa=2要素認証
twofa_scratch=2要素認証スクラッチコード twofa_scratch=2要素認証スクラッチコード
passcode=パスコード passcode=パスコード
webauthn_insert_key=セキュリティキーを挿入
webauthn_sign_in=セキュリティキーのボタンを押してください。セキュリティキーにボタンが無い場合は、挿入しなおしてください。
webauthn_press_button=セキュリティキーのボタンを押してください...
webauthn_use_twofa=携帯電話から2要素認証コードを使用する
webauthn_error=セキュリティキーを読み取ることができません。
webauthn_unsupported_browser=お使いのブラウザは現在 WebAuthn をサポートしていません。
webauthn_error_unknown=不明なエラーが発生しました。 もう一度やり直してください。
webauthn_error_insecure=WebAuthn はセキュアな接続のみをサポートしています。HTTP 経由でテストする場合は、"localhost" または "127.0.0.1" のオリジンが使用できます。
webauthn_error_unable_to_process=サーバーがリクエストを処理できませんでした。
webauthn_error_duplicated=このリクエストに対しては、許可されていないセキュリティキーです。 キーが未登録であることを確認してください。
webauthn_error_empty=このキーに名前を設定する必要があります。
webauthn_error_timeout=キーを読み取る前にタイムアウトになりました。 このページをリロードしてもう一度やり直してください。
webauthn_u2f_deprecated=キー: '%s' は非推奨のU2Fプロセスを使用して認証しています。このキーを再登録して古い登録を削除したほうが良いでしょう。
webauthn_reload=リロード
repository=リポジトリ repository=リポジトリ
organization=組織 organization=組織
@@ -513,6 +527,7 @@ twofa=2要素認証
account_link=連携アカウント account_link=連携アカウント
organization=組織 organization=組織
uid=Uid uid=Uid
webauthn=セキュリティキー
public_profile=公開プロフィール public_profile=公開プロフィール
biography_placeholder=自己紹介を少しだけ biography_placeholder=自己紹介を少しだけ
@@ -534,6 +549,8 @@ continue=続行
cancel=キャンセル cancel=キャンセル
language=言語 language=言語
ui=テーマ ui=テーマ
hidden_comment_types=非表示にするコメントの種類
saved_successfully=設定は正常に保存されました。
privacy=プライバシー privacy=プライバシー
keep_activity_private=プロフィールページのアクティビティ表示を隠す keep_activity_private=プロフィールページのアクティビティ表示を隠す
keep_activity_private_popup=アクティビティを、あなたと管理者にのみ表示します keep_activity_private_popup=アクティビティを、あなたと管理者にのみ表示します
@@ -733,6 +750,11 @@ passcode_invalid=パスコードが間違っています。 再度お試しく
twofa_enrolled=あなたのアカウントに2要素認証が設定されました。 スクラッチトークン (%s) は一度しか表示しませんので安全な場所に保存してください! twofa_enrolled=あなたのアカウントに2要素認証が設定されました。 スクラッチトークン (%s) は一度しか表示しませんので安全な場所に保存してください!
twofa_failed_get_secret=シークレットが取得できません。 twofa_failed_get_secret=シークレットが取得できません。
webauthn_desc=セキュリティキーは暗号化キーを内蔵するハードウェア ・ デバイスです。 2要素認証に使用できます。 セキュリティキーは<a rel="noreferrer" target="_blank" href="https://w3c.github.io/webauthn/#webauthn-authenticator">WebAuthn Authenticator</a>規格をサポートしている必要があります。
webauthn_register_key=セキュリティキーを追加
webauthn_nickname=ニックネーム
webauthn_delete_key=セキュリティキーの登録解除
webauthn_delete_key_desc=セキュリティキーの登録を解除すると、今後そのセキュリティキーでサインインすることはできなくなります。 続行しますか?
manage_account_links=連携アカウントの管理 manage_account_links=連携アカウントの管理
manage_account_links_desc=これらの外部アカウントがGiteaアカウントと連携されています。 manage_account_links_desc=これらの外部アカウントがGiteaアカウントと連携されています。
@@ -1038,6 +1060,10 @@ editor.add_tmpl='<ファイル名>' を追加
editor.add='%s' を追加 editor.add='%s' を追加
editor.update='%s' を更新 editor.update='%s' を更新
editor.delete='%s' を削除 editor.delete='%s' を削除
editor.patch=パッチの適用
editor.patching=パッチ:
editor.fail_to_apply_patch=パッチを適用できません '%s'
editor.new_patch=新しいパッチ
editor.commit_message_desc=詳細な説明を追加… editor.commit_message_desc=詳細な説明を追加…
editor.signoff_desc=コミットログメッセージの最後にコミッターの Signed-off-by 行を追加 editor.signoff_desc=コミットログメッセージの最後にコミッターの Signed-off-by 行を追加
editor.commit_directly_to_this_branch=ブランチ<strong class="branch-name">%s</strong>へ直接コミットする。 editor.commit_directly_to_this_branch=ブランチ<strong class="branch-name">%s</strong>へ直接コミットする。
@@ -1073,6 +1099,8 @@ editor.cannot_commit_to_protected_branch=保護されたブランチ '%s' にコ
editor.no_commit_to_branch=ブランチに直接コミットすることはできません、なぜなら: editor.no_commit_to_branch=ブランチに直接コミットすることはできません、なぜなら:
editor.user_no_push_to_branch=ユーザーはブランチにプッシュできません editor.user_no_push_to_branch=ユーザーはブランチにプッシュできません
editor.require_signed_commit=ブランチでは署名されたコミットが必須です editor.require_signed_commit=ブランチでは署名されたコミットが必須です
editor.cherry_pick=チェリーピック %s:
editor.revert=リバート %s:
commits.desc=ソースコードの変更履歴を参照します。 commits.desc=ソースコードの変更履歴を参照します。
commits.commits=コミット commits.commits=コミット
@@ -1093,6 +1121,7 @@ commits.signed_by_untrusted_user_unmatched=コミッターと一致しない信
commits.gpg_key_id=GPGキーID commits.gpg_key_id=GPGキーID
commits.ssh_key_fingerprint=SSH鍵のフィンガープリント commits.ssh_key_fingerprint=SSH鍵のフィンガープリント
ext_issues=外部イシューへのアクセス ext_issues=外部イシューへのアクセス
ext_issues.desc=外部のイシュートラッカーへのリンク。 ext_issues.desc=外部のイシュートラッカーへのリンク。
@@ -2314,6 +2343,7 @@ first_page=最初
last_page=最後 last_page=最後
total=合計: %d total=合計: %d
dashboard.new_version_hint=Gitea %s が入手可能になりました。 現在実行しているのは %s です。 詳細は <a target="_blank" rel="noreferrer" href="https://blog.gitea.io">ブログ</a> を確認してください。
dashboard.statistic=サマリー dashboard.statistic=サマリー
dashboard.operations=メンテナンス操作 dashboard.operations=メンテナンス操作
dashboard.system_status=システム状況 dashboard.system_status=システム状況
@@ -2387,6 +2417,7 @@ dashboard.last_gc_pause=前回のGC停止時間
dashboard.gc_times=GC実行回数 dashboard.gc_times=GC実行回数
dashboard.delete_old_actions=データベースから古い操作履歴をすべて削除 dashboard.delete_old_actions=データベースから古い操作履歴をすべて削除
dashboard.delete_old_actions.started=データベースからの古い操作履歴の削除を開始しました。 dashboard.delete_old_actions.started=データベースからの古い操作履歴の削除を開始しました。
dashboard.update_checker=更新チェック
users.user_manage_panel=ユーザーアカウント管理 users.user_manage_panel=ユーザーアカウント管理
users.new_account=ユーザーアカウントを作成 users.new_account=ユーザーアカウントを作成

View File

@@ -837,7 +837,7 @@ default_branch=Ramo principal
default_branch_helper=O ramo principal é o ramo base para pedidos de integração e cometimentos. default_branch_helper=O ramo principal é o ramo base para pedidos de integração e cometimentos.
mirror_prune=Podar mirror_prune=Podar
mirror_prune_desc=Remover referências obsoletas de seguimento remoto mirror_prune_desc=Remover referências obsoletas de seguimento remoto
mirror_interval=Intervalo de espelhamento (as unidade de tempo válidas são 'h', 'm' e 's'). O valor zero desabilita a sincronização automática. mirror_interval=Intervalo de espelhamento (as unidades de tempo válidas são 'h', 'm' e 's'). O valor zero desabilita a sincronização automática.
mirror_interval_invalid=O intervalo do espelhamento não é válido. mirror_interval_invalid=O intervalo do espelhamento não é válido.
mirror_address=Clonar a partir do URL mirror_address=Clonar a partir do URL
mirror_address_desc=Coloque, na secção de Autorização, as credenciais que, eventualmente, sejam necessárias. mirror_address_desc=Coloque, na secção de Autorização, as credenciais que, eventualmente, sejam necessárias.
@@ -2334,6 +2334,7 @@ first_page=Primeira
last_page=Última last_page=Última
total=total: %d total=total: %d
dashboard.new_version_hint=O Gitea %s está agora disponível, você está a correr a versão %s. Verifique o <a target="_blank" rel="noreferrer" href="https://blog.gitea.io">blog</a> para mais detalhes.
dashboard.statistic=Resumo dashboard.statistic=Resumo
dashboard.operations=Operações de manutenção dashboard.operations=Operações de manutenção
dashboard.system_status=Estado do sistema dashboard.system_status=Estado do sistema
@@ -2407,6 +2408,7 @@ dashboard.last_gc_pause=Última pausa da recolha de lixo
dashboard.gc_times=Tempos da recolha de lixo dashboard.gc_times=Tempos da recolha de lixo
dashboard.delete_old_actions=Eliminar todas as operações antigas da base de dados dashboard.delete_old_actions=Eliminar todas as operações antigas da base de dados
dashboard.delete_old_actions.started=Foi iniciado o processo de eliminação de todas as operações antigas da base de dados. dashboard.delete_old_actions.started=Foi iniciado o processo de eliminação de todas as operações antigas da base de dados.
dashboard.update_checker=Verificador de novas versões
users.user_manage_panel=Gestão das contas de utilizadores users.user_manage_panel=Gestão das contas de utilizadores
users.new_account=Criar conta de utilizador users.new_account=Criar conta de utilizador

View File

@@ -781,7 +781,7 @@ template_helper=Сделать репозиторий шаблоном
template_description=Шаблонные репозитории дают возможность пользователям создавать новые репозитории с той же структурой каталогов, файлами и дополнительными настройками. template_description=Шаблонные репозитории дают возможность пользователям создавать новые репозитории с той же структурой каталогов, файлами и дополнительными настройками.
visibility=Видимость visibility=Видимость
visibility_description=Только владелец или члены организации, при наличии прав, смогут увидеть это. visibility_description=Только владелец или члены организации, при наличии прав, смогут увидеть это.
visibility_helper=Сделать репозиторий приватным visibility_helper=Сделать репозиторий частным
visibility_helper_forced=Администратор сайта настроил параметр видимости новых репозиториев. Репозиторий приватный по умолчанию. visibility_helper_forced=Администратор сайта настроил параметр видимости новых репозиториев. Репозиторий приватный по умолчанию.
visibility_fork_helper=(Изменение этого повлияет на все форки.) visibility_fork_helper=(Изменение этого повлияет на все форки.)
clone_helper=Нужна помощь в клонировании? Посетите страницу <a target="_blank" rel="noopener noreferrer" href="%s">помощи</a>. clone_helper=Нужна помощь в клонировании? Посетите страницу <a target="_blank" rel="noopener noreferrer" href="%s">помощи</a>.

View File

@@ -34,6 +34,7 @@ twofa=Двофакторна авторизація
twofa_scratch=Двофакторний одноразовий пароль twofa_scratch=Двофакторний одноразовий пароль
passcode=Код доступу passcode=Код доступу
webauthn_reload=Оновити
repository=Репозиторій repository=Репозиторій
organization=Організація organization=Організація
@@ -61,7 +62,7 @@ forks=Форки
activities=Дії activities=Дії
pull_requests=Запити на злиття pull_requests=Запити на злиття
issues=Проблеми issues=Задачі
milestones=Етапи milestones=Етапи
ok=OK ok=OK
@@ -92,7 +93,9 @@ error404=Сторінка, до якої ви намагаєтеся зверн
never=Ніколи never=Ніколи
[error] [error]
occurred=Сталася помилка
missing_csrf=Некоректний запит: токен CSRF не задано missing_csrf=Некоректний запит: токен CSRF не задано
network_error=Помилка мережі
[startpage] [startpage]
app_desc=Зручний власний сервіс хостингу репозиторіїв Git app_desc=Зручний власний сервіс хостингу репозиторіїв Git
@@ -346,7 +349,7 @@ reset_password.text=Перейдіть за цим посиланням, щоб
register_success=Реєстрація успішна register_success=Реєстрація успішна
issue_assigned.pull=@%[1]s призначив вам запит злиття %[2]s в репозиторії %[3]s. issue_assigned.pull=@%[1]s призначив вам запит злиття %[2]s в репозиторії %[3]s.
issue_assigned.issue=@%[1]s призначив вам завдання %[2]s у репозиторії %[3]s. issue_assigned.issue=@%[1]s призначив вам задачу %[2]s у репозиторії %[3]s.
issue.x_mentioned_you=<b>@%s</b> згадав вас: issue.x_mentioned_you=<b>@%s</b> згадав вас:
issue.action.force_push=<b>%[1]s</b> force-pushed <b>%[2]s</b> з %[3]s в %[4]s. issue.action.force_push=<b>%[1]s</b> force-pushed <b>%[2]s</b> з %[3]s в %[4]s.
@@ -474,7 +477,7 @@ activity=Публічна активність
followers=Читачі followers=Читачі
starred=Обрані Репозиторії starred=Обрані Репозиторії
watched=Відстежувані репозиторії watched=Відстежувані репозиторії
projects=Проекти projects=Проєкт
following=Читає following=Читає
follow=Підписатися follow=Підписатися
unfollow=Відписатися unfollow=Відписатися
@@ -611,6 +614,7 @@ gpg_token_help=Ви можете створити підпис за допомо
gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig gpg_token_code=echo "%s" | gpg -a --default-key %s --detach-sig
gpg_token_signature=Текстовий (armored) підпис GPG gpg_token_signature=Текстовий (armored) підпис GPG
key_signature_gpg_placeholder=Починається з "-----BEGIN PGP SIGNATURE-----" key_signature_gpg_placeholder=Починається з "-----BEGIN PGP SIGNATURE-----"
ssh_token=Токен
subkeys=Підключі subkeys=Підключі
key_id=ID ключа key_id=ID ключа
key_name=Ім'я ключа key_name=Ім'я ключа
@@ -743,7 +747,7 @@ visibility.private=Приватний
visibility.private_tooltip=Видимий лише членам організації visibility.private_tooltip=Видимий лише членам організації
[repo] [repo]
new_repo_helper=Репозиторій містить усі файли проекту, включаючи історію ревізій. Ще десь є? <a href="%s">Мігрувати репозиторій.</a> new_repo_helper=Репозиторій містить усі файли проєкту, включаючи історію ревізій. Ще десь є? <a href="%s">Мігрувати репозиторій.</a>
owner=Власник owner=Власник
owner_helper=Деякі організації можуть не відображатися у випадаючому списку через максимальну кількість репозиторііїв. owner_helper=Деякі організації можуть не відображатися у випадаючому списку через максимальну кількість репозиторііїв.
repo_name=Назва репозиторію repo_name=Назва репозиторію
@@ -774,14 +778,14 @@ repo_desc_helper=Введіть короткий опис (опціональн
repo_lang=Мова repo_lang=Мова
repo_gitignore_helper=Виберіть шаблон .gitignore. repo_gitignore_helper=Виберіть шаблон .gitignore.
repo_gitignore_helper_desc=Оберіть з списку мовних шаблонів файли, які не будуть відстежуватись. Типові артефакти, які генеруються за допомогою інструментів побудови кожної мови, за замовчуванням включені до .gitignor. repo_gitignore_helper_desc=Оберіть з списку мовних шаблонів файли, які не будуть відстежуватись. Типові артефакти, які генеруються за допомогою інструментів побудови кожної мови, за замовчуванням включені до .gitignor.
issue_labels=Мітки проблем issue_labels=Мітки задачі
issue_labels_helper=Вибрати мітку для проблеми. issue_labels_helper=Вибрати мітку для задачі.
license=Ліцензія license=Ліцензія
license_helper=Виберіть ліцензійний файл. license_helper=Виберіть ліцензійний файл.
license_helper_desc=Ліцензія регулює те, що інші можуть і не можуть робити з вашим кодом. Не впевнені, що саме підходить для вашого проекту? Дивіться <a target="_blank" rel="noopener noreferrer" href="%s">Виберіть ліцензію.</a> license_helper_desc=Ліцензія регулює те, що інші можуть і не можуть робити з вашим кодом. Не впевнені, що саме підходить для вашого проєкту? Дивіться <a target="_blank" rel="noopener noreferrer" href="%s">Виберіть ліцензію.</a>
readme=README readme=README
readme_helper=Виберіть шаблон README. readme_helper=Виберіть шаблон README.
readme_helper_desc=Це місце, де ви можете написати повний опис вашого проекту. readme_helper_desc=Це місце, де ви можете написати повний опис вашого проєкту.
auto_init=Ініціалізувати репозиторій (Додає .gitignore, LICENSE та README) auto_init=Ініціалізувати репозиторій (Додає .gitignore, LICENSE та README)
trust_model_helper=Виберіть модель довіри для підтвердження підпису. Можливі варіанти: trust_model_helper=Виберіть модель довіри для підтвердження підпису. Можливі варіанти:
trust_model_helper_collaborator=Співавтор: підписи довіри від співавторів trust_model_helper_collaborator=Співавтор: підписи довіри від співавторів
@@ -846,12 +850,12 @@ template.git_hooks=Перехоплювачі Git
template.webhooks=Webhook'и template.webhooks=Webhook'и
template.topics=Теми template.topics=Теми
template.avatar=Аватар template.avatar=Аватар
template.issue_labels=Мітки проблем template.issue_labels=Мітки задачі
template.one_item=Слід обрати хоча б один елемент шаблону template.one_item=Слід обрати хоча б один елемент шаблону
template.invalid=Слід обрати шаблонний репозиторій template.invalid=Слід обрати шаблонний репозиторій
archive.title=Це архівний репозитарій. Ви можете переглядати і клонувати файли, але не можете робити пуш або відкривати питання/запити. archive.title=Цей репозиторій архівовано. Ви можете переглядати файли та клонувати його, але не можете виконувати push чи відкривати задачі та запити злиття.
archive.issue.nocomment=Це архівний репозитарій. Ви не можете коментувати запити. archive.issue.nocomment=Цей репозиторій архівовано. Ви не можете коментувати задачі.
archive.pull.nocomment=Це архівний репозитарій. Ви не можете коментувати пулл-реквести. archive.pull.nocomment=Це архівний репозитарій. Ви не можете коментувати пулл-реквести.
form.reach_limit_of_creation_1=Ви вже досягли ліміту в %d репозиторіїв. form.reach_limit_of_creation_1=Ви вже досягли ліміту в %d репозиторіїв.
@@ -873,7 +877,7 @@ migrate_items=Деталі міграції
migrate_items_wiki=Вікі migrate_items_wiki=Вікі
migrate_items_milestones=Етапи migrate_items_milestones=Етапи
migrate_items_labels=Мітки migrate_items_labels=Мітки
migrate_items_issues=Проблеми migrate_items_issues=Задачі
migrate_items_pullrequests=Запити на злиття migrate_items_pullrequests=Запити на злиття
migrate_items_merge_requests=Запити на злиття migrate_items_merge_requests=Запити на злиття
migrate_items_releases=Релізи migrate_items_releases=Релізи
@@ -906,7 +910,7 @@ migrate.migrating_topics=Міграція тем
migrate.migrating_milestones=Міграція етапів migrate.migrating_milestones=Міграція етапів
migrate.migrating_labels=Міграція міток migrate.migrating_labels=Міграція міток
migrate.migrating_releases=Міграція релізів migrate.migrating_releases=Міграція релізів
migrate.migrating_issues=Міграція проблем migrate.migrating_issues=Міграція задач
migrate.migrating_pulls=Міграція запитів на злиття migrate.migrating_pulls=Міграція запитів на злиття
mirror_from=дзеркало mirror_from=дзеркало
@@ -939,7 +943,7 @@ filter_branch_and_tag=Фільтрувати гілку або тег
find_tag=Знайти тег find_tag=Знайти тег
branches=Гілки branches=Гілки
tags=Теги tags=Теги
issues=Проблеми issues=Задачі
pulls=Запити на злиття pulls=Запити на злиття
project_board=Проєкти project_board=Проєкти
labels=Мітки labels=Мітки
@@ -1053,10 +1057,12 @@ commits.signed_by_untrusted_user=Підписаний недовіреним к
commits.signed_by_untrusted_user_unmatched=Підписаний недовіреним користувачем, який не відповідає комітеру commits.signed_by_untrusted_user_unmatched=Підписаний недовіреним користувачем, який не відповідає комітеру
commits.gpg_key_id=Ідентифікатор GPG ключа commits.gpg_key_id=Ідентифікатор GPG ключа
ext_issues.desc=Посилання на зовнішню систему відстеження проблем.
ext_issues=Доступ до зовнішніх задач
ext_issues.desc=Посилання на зовнішню систему відстеження задач.
projects=Проєкти projects=Проєкти
projects.desc=Керуйте проблемами та запитами злиття на дошках проєкту. projects.desc=Керуйте задачами та запитами злиття на дошках проєкту.
projects.description=Опис (необов'язково) projects.description=Опис (необов'язково)
projects.description_placeholder=Опис projects.description_placeholder=Опис
projects.create=Створити проєкт projects.create=Створити проєкт
@@ -1065,10 +1071,10 @@ projects.new=Новий проєкт
projects.new_subheader=Координуйте, відстежуйте та оновлюйте інформацію про виконувану роботу в одному місці, аби проєкти залишалися прозорими та за розкладом. projects.new_subheader=Координуйте, відстежуйте та оновлюйте інформацію про виконувану роботу в одному місці, аби проєкти залишалися прозорими та за розкладом.
projects.create_success=Проєкт '%s' створено. projects.create_success=Проєкт '%s' створено.
projects.deletion=Видалити проєкт projects.deletion=Видалити проєкт
projects.deletion_desc=Видалення проєкту видаляє його з усіх пов'язаних проблем. Продовжити? projects.deletion_desc=Видалення проєкту видаляє його з усіх пов'язаних задач. Продовжити?
projects.deletion_success=Проєкт видалено. projects.deletion_success=Проєкт видалено.
projects.edit=Редагувати проєкти projects.edit=Редагувати проєкти
projects.edit_subheader=Проєкти призначені для організації проблем та відстеження поступу. projects.edit_subheader=Проєкти організовують задачі та відстежують прогрес.
projects.modify=Оновити проєкт projects.modify=Оновити проєкт
projects.edit_success=Проєкт '%s' оновлено. projects.edit_success=Проєкт '%s' оновлено.
projects.type.none=Відсутній projects.type.none=Відсутній
@@ -1083,9 +1089,9 @@ projects.board.new_title=Назва нової дошки
projects.board.new_submit=Створити projects.board.new_submit=Створити
projects.board.new=Нова дошка projects.board.new=Нова дошка
projects.board.set_default=Встановити за замовчуванням projects.board.set_default=Встановити за замовчуванням
projects.board.set_default_desc=Встановити цю дошку за замовчуванням для проблем без категорії та витягувань projects.board.set_default_desc=Встановити цю дошку за замовчуванням для задач без категорії та витягувань
projects.board.delete=Видалити дошку projects.board.delete=Видалити дошку
projects.board.deletion_desc=Видалення дошки проєкту перенесе всі пов'язані проблеми в дошку 'Без категорії'. Продовжити? projects.board.deletion_desc=Видалення дошки проєкту перенесе всі пов'язані задачі в дошку 'Без категорії'. Продовжити?
projects.board.color=Колір projects.board.color=Колір
projects.open=Відкрити projects.open=Відкрити
projects.close=Закрити projects.close=Закрити
@@ -1096,7 +1102,7 @@ issues.filter_milestones=Фільтр етапів
issues.filter_projects=Фільтр проєктів issues.filter_projects=Фільтр проєктів
issues.filter_labels=Фільтр міток issues.filter_labels=Фільтр міток
issues.filter_reviewers=Фільтр рецензентів issues.filter_reviewers=Фільтр рецензентів
issues.new=Нова проблема issues.new=Нова задача
issues.new.title_empty=Заголовок не може бути пустим issues.new.title_empty=Заголовок не може бути пустим
issues.new.labels=Мітки issues.new.labels=Мітки
issues.new.add_labels_title=Застосувати мітки issues.new.add_labels_title=Застосувати мітки
@@ -1125,7 +1131,7 @@ issues.choose.get_started=Початок роботи
issues.choose.blank=Типово issues.choose.blank=Типово
issues.choose.blank_about=Створити задачу із шаблону за замовчуванням. issues.choose.blank_about=Створити задачу із шаблону за замовчуванням.
issues.no_ref=Не вказана гілка або тег issues.no_ref=Не вказана гілка або тег
issues.create=Створити проблему issues.create=Створити задачу
issues.new_label=Нова мітка issues.new_label=Нова мітка
issues.new_label_placeholder=Назва мітки issues.new_label_placeholder=Назва мітки
issues.new_label_desc_placeholder=Опис issues.new_label_desc_placeholder=Опис
@@ -1167,7 +1173,7 @@ issues.filter_milestone_no_select=Всі етапи
issues.filter_assignee=Виконавець issues.filter_assignee=Виконавець
issues.filter_assginee_no_select=Всі виконавці issues.filter_assginee_no_select=Всі виконавці
issues.filter_type=Тип issues.filter_type=Тип
issues.filter_type.all_issues=Всі проблеми issues.filter_type.all_issues=Всі задачі
issues.filter_type.assigned_to_you=Призначене вам issues.filter_type.assigned_to_you=Призначене вам
issues.filter_type.created_by_you=Створено вами issues.filter_type.created_by_you=Створено вами
issues.filter_type.mentioning_you=Вас згадано issues.filter_type.mentioning_you=Вас згадано
@@ -1203,7 +1209,7 @@ issues.commented_at=`прокоментував(ла) <a href="#%s">%s</a>`
issues.delete_comment_confirm=Ви впевнені, що хочете видалити цей коментар? issues.delete_comment_confirm=Ви впевнені, що хочете видалити цей коментар?
issues.context.copy_link=Скопіювати посилання issues.context.copy_link=Скопіювати посилання
issues.context.quote_reply=Цитувати відповідь issues.context.quote_reply=Цитувати відповідь
issues.context.reference_issue=Посилання в новій проблемі issues.context.reference_issue=Посилання в новій задачі
issues.context.edit=Редагувати issues.context.edit=Редагувати
issues.context.delete=Видалити issues.context.delete=Видалити
issues.no_content=Тут ще немає жодного змісту. issues.no_content=Тут ще немає жодного змісту.
@@ -1214,15 +1220,15 @@ issues.close_comment_issue=Прокоментувати і закрити
issues.reopen_issue=Відкрити знову issues.reopen_issue=Відкрити знову
issues.reopen_comment_issue=Прокоментувати та відкрити знову issues.reopen_comment_issue=Прокоментувати та відкрити знову
issues.create_comment=Коментар issues.create_comment=Коментар
issues.closed_at=`закрив цю проблему <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.closed_at=`закрив цю задачу <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.reopened_at=`повторно відкрив цю проблему <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.reopened_at=`повторно відкрив цю задачу <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.commit_ref_at=`згадано цю проблему в коміті <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.commit_ref_at=`згадано цю задачу в коміті <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_issue_from=`<a href="%[3]s">послався на цю проблему %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_issue_from=`<a href="%[3]s">посилання на цю задачу %[4]</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_pull_from=`<a href="%[3]s">послався на цей запит злиття %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_pull_from=`<a href="%[3]s">послався на цей запит злиття %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_closing_from=`<a href="%[3]s">послався на запит злиття %[4]s, який закриває цю проблему</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_closing_from=`<a href="%[3]s">згадав запит на злиття %[4]с, які закриють цю задачу</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_reopening_from=`<a href="%[3]s">послався на запит злиття %[4]s, який повторно відкриває цю проблему</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_reopening_from=`<a href="%[3]s">згадав запит на злиття %[4]с, які повторно відкриють цю задачу</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_closed_from=`<a href="%[3]s">закрив цю проблему %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_closed_from=`<a href="%[3]s">закрив цю задачу %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_reopened_from=`<a href="%[3]s">повторно відкрив цю проблему %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>` issues.ref_reopened_from=`<a href="%[3]s">повторно відкрито цю задачу %[4]s</a> <a id="%[1]s" href="#%[1]s">%[2]s</a>`
issues.ref_from=`із %[1]s` issues.ref_from=`із %[1]s`
issues.poster=Автор issues.poster=Автор
issues.collaborator=Співавтор issues.collaborator=Співавтор
@@ -1241,12 +1247,12 @@ issues.label_title=Назва мітки
issues.label_description=Опис мітки issues.label_description=Опис мітки
issues.label_color=Колір мітки issues.label_color=Колір мітки
issues.label_count=%d міток issues.label_count=%d міток
issues.label_open_issues=%d відкритих проблем issues.label_open_issues=%d відкритих задач
issues.label_edit=Редагувати issues.label_edit=Редагувати
issues.label_delete=Видалити issues.label_delete=Видалити
issues.label_modify=Редагувати мітку issues.label_modify=Редагувати мітку
issues.label_deletion=Видалити мітку issues.label_deletion=Видалити мітку
issues.label_deletion_desc=Видалення мітки видаляє її з усіх обговорень. Продовжити? issues.label_deletion_desc=Видалення мітки видаляє її з усіх задач. Продовжити?
issues.label_deletion_success=Мітку було видалено. issues.label_deletion_success=Мітку було видалено.
issues.label.filter_sort.alphabetically=За алфавітом issues.label.filter_sort.alphabetically=За алфавітом
issues.label.filter_sort.reverse_alphabetically=З кінця алфавіту issues.label.filter_sort.reverse_alphabetically=З кінця алфавіту
@@ -1259,29 +1265,29 @@ issues.subscribe=Підписатися
issues.unsubscribe=Відписатися issues.unsubscribe=Відписатися
issues.lock=Блокування обговорення issues.lock=Блокування обговорення
issues.unlock=Розблокування обговорення issues.unlock=Розблокування обговорення
issues.lock.unknown_reason=Неможливо заблокувати проблему з невідомою причиною. issues.lock.unknown_reason=Неможливо заблокувати задачу з невідомою причиною.
issues.lock_duplicate=Проблема не може бути заблокованим двічі. issues.lock_duplicate=Задача не може бути заблокованим двічі.
issues.unlock_error=Не можливо розблокувати проблему, яка не заблокована. issues.unlock_error=Не можливо розблокувати задачу, яка не заблокована.
issues.lock_with_reason=заблоковано як <strong>%s</strong> та обмежене обговорення для співавторів %s issues.lock_with_reason=заблоковано як <strong>%s</strong> та обмежене обговорення для співавторів %s
issues.lock_no_reason=заблоковано та обмежене обговорення для співавторів %s issues.lock_no_reason=заблоковано та обмежене обговорення для співавторів %s
issues.unlock_comment=розблоковане обговорення %s issues.unlock_comment=розблоковане обговорення %s
issues.lock_confirm=Заблокувати issues.lock_confirm=Заблокувати
issues.unlock_confirm=Розблокувати issues.unlock_confirm=Розблокувати
issues.lock.notice_1=- Інші користувачі не можуть додавати нові коментарі до цієї проблеми. issues.lock.notice_1=- Інші користувачі не можуть додавати нові коментарі до цієї задачі.
issues.lock.notice_2=- Ви й інші співавтори, які мають доступ до цього репозиторію, можете залишати коментарі, які інші можуть бачити. issues.lock.notice_2=- Ви й інші співавтори, які мають доступ до цього репозиторію, можете залишати коментарі, які інші можуть бачити.
issues.lock.notice_3=- Ви завжди зможете розблокувати цю проблему в майбутньому. issues.lock.notice_3=- Ви завжди зможете розблокувати цю задачу в майбутньому.
issues.unlock.notice_1=- Кожен зможе прокоментувати це питання ще раз. issues.unlock.notice_1=- Кожен зможе прокоментувати цю задачу ще раз.
issues.unlock.notice_2=- Ви завжди зможете заблокувати цю проблему в майбутньому. issues.unlock.notice_2=- Ви завжди зможете заблокувати цю задачу в майбутньому.
issues.lock.reason=Причина блокування issues.lock.reason=Причина блокування
issues.lock.title=Заблокувати обговорення цієї проблеми. issues.lock.title=Заблокувати обговорення цієї задачі.
issues.unlock.title=Розблокувати обговорення цієї проблеми. issues.unlock.title=Розблокувати обговорення цієї задачі.
issues.comment_on_locked=Ви не можете коментувати заблоковану проблему. issues.comment_on_locked=Ви не можете коментувати заблоковану задачу.
issues.tracker=Відстеження часу issues.tracker=Відстеження часу
issues.start_tracking_short=Запустити таймер issues.start_tracking_short=Запустити таймер
issues.start_tracking=Почати відстеження часу issues.start_tracking=Почати відстеження часу
issues.start_tracking_history=`почав працювати %s` issues.start_tracking_history=`почав працювати %s`
issues.tracker_auto_close=Таймер буде автоматично зупинено, коли ця проблема буде закрита issues.tracker_auto_close=Таймер буде автоматично зупинено, коли ця задача буде закрита
issues.tracking_already_started=`Ви вже почали відстежувати час для <a href="%s">іншої проблеми</a>!` issues.tracking_already_started=`Ви вже почали відстежувати час для <a href="%s">іншої задачі</a>!`
issues.stop_tracking=Зупинити таймер issues.stop_tracking=Зупинити таймер
issues.stop_tracking_history=`перестав(-ла) працювати %s` issues.stop_tracking_history=`перестав(-ла) працювати %s`
issues.cancel_tracking=Скасувати issues.cancel_tracking=Скасувати
@@ -1308,7 +1314,7 @@ issues.due_date_form=рррр-мм-дд
issues.due_date_form_add=Додати дату завершення issues.due_date_form_add=Додати дату завершення
issues.due_date_form_edit=Редагувати issues.due_date_form_edit=Редагувати
issues.due_date_form_remove=Видалити issues.due_date_form_remove=Видалити
issues.due_date_not_writer=Вам потрібен доступ до запису в репозиторії, щоб оновити дату завершення проблем. issues.due_date_not_writer=Вам потрібен доступ до запису в репозиторії, щоб оновити дату завершення задач.
issues.due_date_not_set=Термін виконання не встановлений. issues.due_date_not_set=Термін виконання не встановлений.
issues.due_date_added=додав(ла) дату завершення %s %s issues.due_date_added=додав(ла) дату завершення %s %s
issues.due_date_modified=термін змінено з %s %s на %s issues.due_date_modified=термін змінено з %s %s на %s
@@ -1316,7 +1322,7 @@ issues.due_date_remove=видалив(ла) дату завершення %s %s
issues.due_date_overdue=Прострочено issues.due_date_overdue=Прострочено
issues.due_date_invalid=Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'. issues.due_date_invalid=Термін дії не дійсний або знаходиться за межами допустимого діапазону. Будь ласка використовуйте формат 'yyyy-mm-dd'.
issues.dependency.title=Залежності issues.dependency.title=Залежності
issues.dependency.issue_no_dependencies=Ця проблема в даний час не має залежностей. issues.dependency.issue_no_dependencies=Ця задача тепер не має залежностей.
issues.dependency.pr_no_dependencies=Цей запит на злиття в даний час не має залежностей. issues.dependency.pr_no_dependencies=Цей запит на злиття в даний час не має залежностей.
issues.dependency.add=Додати залежність… issues.dependency.add=Додати залежність…
issues.dependency.cancel=Відмінити issues.dependency.cancel=Відмінити
@@ -1324,24 +1330,24 @@ issues.dependency.remove=Видалити
issues.dependency.remove_info=Видалити цю залежність issues.dependency.remove_info=Видалити цю залежність
issues.dependency.added_dependency=`додав нову залежність %s` issues.dependency.added_dependency=`додав нову залежність %s`
issues.dependency.removed_dependency=`видалив залежність %s` issues.dependency.removed_dependency=`видалив залежність %s`
issues.dependency.pr_closing_blockedby=Закриття цього запиту злиття заблоковано наступними проблемами issues.dependency.pr_closing_blockedby=Закриття цього запиту злиття заблоковано наступними задачами
issues.dependency.issue_closing_blockedby=Закриття цієї проблеми заблоковано наступними проблемами issues.dependency.issue_closing_blockedby=Закриття цієї задачи заблоковано наступними задачами
issues.dependency.issue_close_blocks=Ця проблема блокує закриття залежних проблем issues.dependency.issue_close_blocks=Ця задача блокує закриття залежних задач
issues.dependency.pr_close_blocks=Цей пулл-реквест блокує закриття залежних проблем issues.dependency.pr_close_blocks=Цей запит на злиття блокує закриття залежних задач
issues.dependency.issue_close_blocked=Вам потрібно закрити всі проблеми, що блокують цю проблему, перед її закриттям. issues.dependency.issue_close_blocked=Вам потрібно закрити всі задачі, що блокують цю задачу, перед її закриттям.
issues.dependency.pr_close_blocked=Вам потрібно закрити всі проблеми, що блокують цей пулл-реквест, перед його злиттям. issues.dependency.pr_close_blocked=Вам потрібно закрити всі задачі, що блокують цей запит, перед його злиттям.
issues.dependency.blocks_short=Блоки issues.dependency.blocks_short=Блоки
issues.dependency.blocked_by_short=Залежить від issues.dependency.blocked_by_short=Залежить від
issues.dependency.remove_header=Видалити залежність issues.dependency.remove_header=Видалити залежність
issues.dependency.issue_remove_text=Це призведе до видалення залежності з цієї проблеми. Продовжити? issues.dependency.issue_remove_text=Це призведе до видалення залежності з цієї задачі. Продовжити?
issues.dependency.pr_remove_text=Це призведе до видалення залежності з цього пулл-реквесту. Продовжити? issues.dependency.pr_remove_text=Це призведе до видалення залежності з цього пулл-реквесту. Продовжити?
issues.dependency.setting=Увімкнути залежності для проблем та пулл-реквестів issues.dependency.setting=Увімкнути залежності для задач та запитів на злиття
issues.dependency.add_error_same_issue=Ви не можете зробити проблему залежною від себе. issues.dependency.add_error_same_issue=Ви не можете зробити задачу залежною від себе.
issues.dependency.add_error_dep_issue_not_exist=Залежність для проблеми не існує. issues.dependency.add_error_dep_issue_not_exist=Залежність для задачі не існує.
issues.dependency.add_error_dep_not_exist=Залежність не існує. issues.dependency.add_error_dep_not_exist=Залежність не існує.
issues.dependency.add_error_dep_exists=Залежність уже існує. issues.dependency.add_error_dep_exists=Залежність уже існує.
issues.dependency.add_error_cannot_create_circular=Ви не можете створити залежність з двома проблемами, які блокують одна одну. issues.dependency.add_error_cannot_create_circular=Ви не можете створити залежність з двома задачами, які блокують одна одну.
issues.dependency.add_error_dep_not_same_repo=Обидві проблеми повинні бути в одному репозиторії. issues.dependency.add_error_dep_not_same_repo=Обидві задачі повинні бути в одному репозиторії.
issues.review.self.approval=Ви не можете схвалити власний пулл-реквест. issues.review.self.approval=Ви не можете схвалити власний пулл-реквест.
issues.review.self.rejection=Ви не можете надіслати запит на зміну на власний пулл-реквест. issues.review.self.rejection=Ви не можете надіслати запит на зміну на власний пулл-реквест.
issues.review.approve=зміни затверджено %s issues.review.approve=зміни затверджено %s
@@ -1475,7 +1481,7 @@ pulls.closed_at=`закрив цей запит на злиття <a id="%[1]s"
pulls.reopened_at=`повторно відкрив цей запит на злиття <a id="%[1]s" href="#%[1]s">%[2]s</a>` pulls.reopened_at=`повторно відкрив цей запит на злиття <a id="%[1]s" href="#%[1]s">%[2]s</a>`
pulls.merge_instruction_hint=`Також можна переглянути <a class="show-instruction">інструкції для командного рядка</a>.` pulls.merge_instruction_hint=`Також можна переглянути <a class="show-instruction">інструкції для командного рядка</a>.`
pulls.merge_instruction_step1_desc=У репозиторії вашого проекту перевірте нову гілку і протестуйте зміни. pulls.merge_instruction_step1_desc=У репозиторії вашого проєкту перевірте нову гілку і протестуйте зміни.
pulls.merge_instruction_step2_desc=Об'єднати зміни і оновити на Gitea. pulls.merge_instruction_step2_desc=Об'єднати зміни і оновити на Gitea.
milestones.new=Новий етап milestones.new=Новий етап
@@ -1486,7 +1492,7 @@ milestones.update_ago=Оновлено %s назад
milestones.no_due_date=Немає дати завершення milestones.no_due_date=Немає дати завершення
milestones.open=Відкрити milestones.open=Відкрити
milestones.close=Закрити milestones.close=Закрити
milestones.new_subheader=Створюйте етапи для організації ваших завдань. milestones.new_subheader=Створюйте етапи для організації ваших задач.
milestones.completeness=%d%% завершено milestones.completeness=%d%% завершено
milestones.create=Створити етап milestones.create=Створити етап
milestones.title=Заголовок milestones.title=Заголовок
@@ -1496,19 +1502,19 @@ milestones.clear=Очистити
milestones.invalid_due_date_format=Дата завершення має бути в форматі 'рррр-мм-дд'. milestones.invalid_due_date_format=Дата завершення має бути в форматі 'рррр-мм-дд'.
milestones.create_success=Етап '%s' створений. milestones.create_success=Етап '%s' створений.
milestones.edit=Редагувати етап milestones.edit=Редагувати етап
milestones.edit_subheader=Використовуйте кращий опис контрольної точки, щоб уникнути нерозуміння з боку інших людей. milestones.edit_subheader=Створюйте етапи для організації ваших задач.
milestones.cancel=Відмінити milestones.cancel=Відмінити
milestones.modify=Оновити етап milestones.modify=Оновити етап
milestones.edit_success=Етап '%s' був оновлений. milestones.edit_success=Етап '%s' був оновлений.
milestones.deletion=Видалити етап milestones.deletion=Видалити етап
milestones.deletion_desc=Видалення етапу призведе до його видалення з усіх пов'язаних завдань. Продовжити? milestones.deletion_desc=Видалення етапу призведе до його видалення з усіх пов'язаних задач. Продовжити?
milestones.deletion_success=Етап успішно видалено. milestones.deletion_success=Етап успішно видалено.
milestones.filter_sort.closest_due_date=Найближче за датою milestones.filter_sort.closest_due_date=Найближче за датою
milestones.filter_sort.furthest_due_date=Далі за датою milestones.filter_sort.furthest_due_date=Далі за датою
milestones.filter_sort.least_complete=Менш повне milestones.filter_sort.least_complete=Менш повне
milestones.filter_sort.most_complete=Більш повне milestones.filter_sort.most_complete=Більш повне
milestones.filter_sort.most_issues=Найбільш проблем milestones.filter_sort.most_issues=Найбільш задач
milestones.filter_sort.least_issues=Найменш проблем milestones.filter_sort.least_issues=Найменш задач
signing.will_sign=Цей коміт буде підписано ключем '%s' signing.will_sign=Цей коміт буде підписано ключем '%s'
signing.wont_sign.error=Під час підписання коміту, сталася помилка signing.wont_sign.error=Під час підписання коміту, сталася помилка
@@ -1574,21 +1580,21 @@ activity.title.prs_merged_by=%s злито %s
activity.title.prs_opened_by=%s запропоновано %s activity.title.prs_opened_by=%s запропоновано %s
activity.merged_prs_label=Злито activity.merged_prs_label=Злито
activity.opened_prs_label=Запропоновано activity.opened_prs_label=Запропоновано
activity.active_issues_count_1=<strong>%d</strong> Активна проблема activity.active_issues_count_1=<strong>%d</strong> Активна задача
activity.active_issues_count_n=<strong>%d</strong> Активні проблеми activity.active_issues_count_n=<strong>%d</strong> Активні задачі
activity.closed_issues_count_1=Закрита проблема activity.closed_issues_count_1=Закрита задача
activity.closed_issues_count_n=Закриті проблеми activity.closed_issues_count_n=Закриті задачі
activity.title.issues_1=%d Проблема activity.title.issues_1=%d Задач
activity.title.issues_n=%d Проблеми activity.title.issues_n=%d Задач
activity.title.issues_closed_from=%s закрито %s activity.title.issues_closed_from=%s закрито %s
activity.title.issues_created_by=%s створена(і) %s activity.title.issues_created_by=%s створена(і) %s
activity.closed_issue_label=Закрито activity.closed_issue_label=Закрито
activity.new_issues_count_1=Нова Проблема activity.new_issues_count_1=Нова задача
activity.new_issues_count_n=%d Проблем activity.new_issues_count_n=Нові Задачі
activity.new_issue_label=Відкриті activity.new_issue_label=Відкриті
activity.title.unresolved_conv_1=%d Незавершене обговорення activity.title.unresolved_conv_1=%d Незавершене обговорення
activity.title.unresolved_conv_n=%d Незавершених обговорень activity.title.unresolved_conv_n=%d Незавершених обговорень
activity.unresolved_conv_desc=Список всіх старих тікетів і Pull Request'ів з недавньої активністю, але ще не закритих або прийнятих. activity.unresolved_conv_desc=Список всіх старих задач і Pull Request'ів з недавньої активністю, але ще не закритих або прийнятих.
activity.unresolved_conv_label=Відкрити activity.unresolved_conv_label=Відкрити
activity.title.releases_1=%d Реліз activity.title.releases_1=%d Реліз
activity.title.releases_n=%d Релізів activity.title.releases_n=%d Релізів
@@ -1635,7 +1641,7 @@ settings.hooks=Веб-хуки
settings.githooks=Git хуки settings.githooks=Git хуки
settings.basic_settings=Базові налаштування settings.basic_settings=Базові налаштування
settings.mirror_settings=Налаштування дзеркала settings.mirror_settings=Налаштування дзеркала
settings.mirror_settings.docs=Налаштуйте свій проект, щоб автоматично відправляти/отримувати зміни з іншого репозиторію. Гілки, теги і коміти будуть синхронізуватися автоматично. <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/repo-mirror/">Як я можу відзеркалити репозиторії?</a> settings.mirror_settings.docs=Налаштуйте свій проєкт, щоб автоматично відправляти/отримувати зміни з іншого репозиторію. Гілки, теги та коміти будуть синхронізуватися автоматично. <a target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io/en-us/repo-mirror/">Як я можу відзеркалити репозиторії?</a>
settings.mirror_settings.mirrored_repository=Віддзеркалений репозиторій settings.mirror_settings.mirrored_repository=Віддзеркалений репозиторій
settings.mirror_settings.direction=Напрямок settings.mirror_settings.direction=Напрямок
settings.mirror_settings.direction.pull=Pull settings.mirror_settings.direction.pull=Pull
@@ -1660,12 +1666,12 @@ settings.use_external_wiki=Використовувати зовнішні Ві
settings.external_wiki_url=URL зовнішньої вікі settings.external_wiki_url=URL зовнішньої вікі
settings.external_wiki_url_error=Зовнішня URL-адреса wiki не є допустимою URL-адресою. settings.external_wiki_url_error=Зовнішня URL-адреса wiki не є допустимою URL-адресою.
settings.external_wiki_url_desc=Відвідувачі будуть перенаправлені на URL-адресу, коли вони клацають по вкладці. settings.external_wiki_url_desc=Відвідувачі будуть перенаправлені на URL-адресу, коли вони клацають по вкладці.
settings.issues_desc=Увімкнути відстеження проблем в репозиторію settings.issues_desc=Увімкнути відстеження задач в репозиторію
settings.use_internal_issue_tracker=Використовувати вбудовану систему відстеження проблем settings.use_internal_issue_tracker=Використовувати вбудовану систему відстеження задач
settings.use_external_issue_tracker=Використовувати зовнішню систему обліку завдань settings.use_external_issue_tracker=Використовувати зовнішню систему обліку задач
settings.external_tracker_url=URL зовнішньої системи відстеження проблем settings.external_tracker_url=URL зовнішньої системи відстеження задач
settings.external_tracker_url_error=URL зовнішнього баг-трекера не є допустимою URL-адресою. settings.external_tracker_url_error=URL зовнішнього баг-трекера не є допустимою URL-адресою.
settings.external_tracker_url_desc=Відвідувачі перенаправляються на зовнішню URL-адресу, коли натискають вкладку 'Проблеми'. settings.external_tracker_url_desc=Відвідувачі перенаправляються на зовнішню URL-адресу, коли натискають вкладку 'Задачі'.
settings.tracker_url_format=Формат URL зовнішнього трекера задач settings.tracker_url_format=Формат URL зовнішнього трекера задач
settings.tracker_url_format_error=Неправильний формат URL-адреси зовнішнього баг-трекера. settings.tracker_url_format_error=Неправильний формат URL-адреси зовнішнього баг-трекера.
settings.tracker_issue_style=Формат номеру для зовнішньої системи обліку задач settings.tracker_issue_style=Формат номеру для зовнішньої системи обліку задач
@@ -1686,7 +1692,7 @@ settings.pulls.default_delete_branch_after_merge=Видаляти гілку з
settings.projects_desc=Увімкнути проєкти у репозиторії settings.projects_desc=Увімкнути проєкти у репозиторії
settings.admin_settings=Налаштування адміністратора settings.admin_settings=Налаштування адміністратора
settings.admin_enable_health_check=Включити перевірки працездатності репозиторію (git fsck) settings.admin_enable_health_check=Включити перевірки працездатності репозиторію (git fsck)
settings.admin_enable_close_issues_via_commit_in_any_branch=Закрити проблему за допомогою коміта, зробленого не головній гілці settings.admin_enable_close_issues_via_commit_in_any_branch=Закрити задачу за допомогою коміта, зробленого не в головній гілці
settings.danger_zone=Небезпечна зона settings.danger_zone=Небезпечна зона
settings.new_owner_has_same_repo=Новий власник вже має репозиторій з такою назвою. Будь ласка, виберіть інше ім'я. settings.new_owner_has_same_repo=Новий власник вже має репозиторій з такою назвою. Будь ласка, виберіть інше ім'я.
settings.convert=Перетворити на звичайний репозиторій settings.convert=Перетворити на звичайний репозиторій
@@ -1736,7 +1742,7 @@ settings.wiki_deletion_success=Дані wiki були видалені.
settings.delete=Видалити цей репозиторій settings.delete=Видалити цей репозиторій
settings.delete_desc=Будьте уважні! Як тільки ви видалите репозиторій - шляху назад не буде. settings.delete_desc=Будьте уважні! Як тільки ви видалите репозиторій - шляху назад не буде.
settings.delete_notices_1=- Цю операцію <strong>НЕ МОЖНА</strong> відмінити. settings.delete_notices_1=- Цю операцію <strong>НЕ МОЖНА</strong> відмінити.
settings.delete_notices_2=- Ця операція назавжди видалить все з репозиторію <strong>%s</strong>, включаючи дані Git, пов'язані з ним завдання, коментарі і права доступу для співробітників. settings.delete_notices_2=- Ця операція остаточно видалить <strong>%s</strong> репозиторій, включаючи код, задачі, коментарі, вікі та налаштування співавторів.
settings.delete_notices_fork_1=- Всі форки стануть незалежними репозиторіями після видалення. settings.delete_notices_fork_1=- Всі форки стануть незалежними репозиторіями після видалення.
settings.deletion_success=Репозиторій успішно видалено. settings.deletion_success=Репозиторій успішно видалено.
settings.update_settings_success=Налаштування репозиторію було оновлено. settings.update_settings_success=Налаштування репозиторію було оновлено.
@@ -1806,16 +1812,16 @@ settings.event_push_desc=Git push до репозиторію.
settings.event_repository=Репозиторій settings.event_repository=Репозиторій
settings.event_repository_desc=Репозиторій створений або видалено. settings.event_repository_desc=Репозиторій створений або видалено.
settings.event_header_issue=Події задачі settings.event_header_issue=Події задачі
settings.event_issues=Проблеми settings.event_issues=Задачі
settings.event_issues_desc=Проблема відкрита, закрита, повторно відкрита або відредагована. settings.event_issues_desc=Задача відкрита, закрита, повторно відкрита або відредагована.
settings.event_issue_assign=Проблема прив'язана settings.event_issue_assign=Задача прив'язана
settings.event_issue_assign_desc=Проблема призначена або скасована. settings.event_issue_assign_desc=Задачу призначено або скасовано.
settings.event_issue_label=Проблема з міткою settings.event_issue_label=Задача з міткою
settings.event_issue_label_desc=Мітки проблем оновлено або видалено. settings.event_issue_label_desc=Мітки задачі оновлено або видалено.
settings.event_issue_milestone=Проблеми етапу settings.event_issue_milestone=Задача з етапом
settings.event_issue_milestone_desc=Проблема призначена на етап або видалена з етапу. settings.event_issue_milestone_desc=Задача призначена на етап або видалена з етапу.
settings.event_issue_comment=Коментар проблеми settings.event_issue_comment=Коментар задачі
settings.event_issue_comment_desc=Коментар проблеми створено, видалено чи відредаговано. settings.event_issue_comment_desc=Коментар задачі створено, видалено чи відредаговано.
settings.event_header_pull_request=Події запиту злиття settings.event_header_pull_request=Події запиту злиття
settings.event_pull_request=Запити до злиття settings.event_pull_request=Запити до злиття
settings.event_pull_request_desc=Запит до злиття відкрито, закрито, перевідкрито або відредаговано. settings.event_pull_request_desc=Запит до злиття відкрито, закрито, перевідкрито або відредаговано.
@@ -1942,7 +1948,7 @@ settings.matrix.access_token=Токен Доступу
settings.matrix.message_type=Тип повідомлення settings.matrix.message_type=Тип повідомлення
settings.archive.button=Архівний репозиторій settings.archive.button=Архівний репозиторій
settings.archive.header=Відправити репозиторій в архів settings.archive.header=Відправити репозиторій в архів
settings.archive.text=Архівування репозиторія зробить його доступним лише для читання. Він не відображається на панелі, в нього не можуть вноситись зміни і не можна створювати запити з проблем та пулл-реквести. settings.archive.text=Архівування репозиторія зробить його доступним лише для читання. Він не відображається на панелі, в нього не можуть вноситись зміни і не можна створювати запити з задач та пулл-реквести.
settings.archive.success=Репозиторію успішно присвоєно статус архівного. settings.archive.success=Репозиторію успішно присвоєно статус архівного.
settings.archive.error=Сталася помилка при спробі архівувати репозиторій. Докладнішу інформацію див. у журналі. settings.archive.error=Сталася помилка при спробі архівувати репозиторій. Докладнішу інформацію див. у журналі.
settings.archive.error_ismirror=Неможливо архівувати дзеркальний репозиротрій. settings.archive.error_ismirror=Неможливо архівувати дзеркальний репозиротрій.
@@ -1950,7 +1956,7 @@ settings.archive.branchsettings_unavailable=Параметри гілки не
settings.archive.tagsettings_unavailable=Параметри міток недоступні, якщо репозиторій архівний. settings.archive.tagsettings_unavailable=Параметри міток недоступні, якщо репозиторій архівний.
settings.unarchive.button=Зняти архівний статус settings.unarchive.button=Зняти архівний статус
settings.unarchive.header=Зняти архівний статус для репозиторія settings.unarchive.header=Зняти архівний статус для репозиторія
settings.unarchive.text=Зняття статусу архівного відновить запис в репозиторій, а також відкриє можливість створювати запити з нових проблем та пулл-запити. settings.unarchive.text=Зняття статусу архівного відновить запис в репозиторій, а також відкриє можливість створювати запити з нових задачах та пулл-запити.
settings.unarchive.success=Статус архівний успішно знято. settings.unarchive.success=Статус архівний успішно знято.
settings.unarchive.error=Сталася помилка при спробі скасувати архівний статус репозиторія. Докладнішу інформацію див. у журналі. settings.unarchive.error=Сталася помилка при спробі скасувати архівний статус репозиторія. Докладнішу інформацію див. у журналі.
settings.update_avatar_success=Аватар репозиторію оновлений. settings.update_avatar_success=Аватар репозиторію оновлений.
@@ -2037,7 +2043,7 @@ diff.image.side_by_side=Пліч-о-пліч
diff.image.swipe=Свайп diff.image.swipe=Свайп
diff.image.overlay=Оверлей diff.image.overlay=Оверлей
releases.desc=Відслідковувати версії проекту (релізи) та завантаження. releases.desc=Відслідковувати версії проєкту і завантаження.
release.releases=Релізи release.releases=Релізи
release.detail=Деталі релізу release.detail=Деталі релізу
release.tags=Теги release.tags=Теги
@@ -2050,8 +2056,8 @@ release.edit=редагувати
release.ahead.commits=<strong>%d</strong> коміт(ів) release.ahead.commits=<strong>%d</strong> коміт(ів)
release.ahead.target=до %s з моменту цього випуску release.ahead.target=до %s з моменту цього випуску
release.source_code=Код release.source_code=Код
release.new_subheader=Публікація релізів допоможе зберігати чітку історію розвитку вашого проекту. release.new_subheader=Публікація релізів допоможе вам організувати версію проєкту.
release.edit_subheader=Публікація релізів допоможе зберігати чітку історію розвитку вашого проекту. release.edit_subheader=Публікація релізів допоможе вам організувати версію проєкту.
release.tag_name=Назва тегу release.tag_name=Назва тегу
release.target=Ціль release.target=Ціль
release.tag_helper=Виберіть існуючий тег або створіть новий. release.tag_helper=Виберіть існуючий тег або створіть новий.
@@ -2175,7 +2181,7 @@ settings.delete_org_title=Видалити організацію
settings.delete_org_desc=Ця організація буде безповоротно видалена. Продовжити? settings.delete_org_desc=Ця організація буде безповоротно видалена. Продовжити?
settings.hooks_desc=Додайте webhooks, який буде викликатися для <strong>всіх репозиторіїв</strong> якими володіє ця організація. settings.hooks_desc=Додайте webhooks, який буде викликатися для <strong>всіх репозиторіїв</strong> якими володіє ця організація.
settings.labels_desc=Додайте мітки, які можуть використовуватися для <strong>всіх репозиторіїв</strong> цієї органцізації. settings.labels_desc=Додати мітки, які можуть бути використані для задач для <strong>всіх репозиторіїв</strong> в цій організації.
members.membership_visibility=Видимість учасника: members.membership_visibility=Видимість учасника:
members.public=Показувати members.public=Показувати
@@ -2400,7 +2406,7 @@ repos.private=Приватний
repos.watches=Стежать repos.watches=Стежать
repos.stars=В обраному repos.stars=В обраному
repos.forks=Форки repos.forks=Форки
repos.issues=Проблеми repos.issues=Задачі
repos.size=Розмір repos.size=Розмір
defaulthooks=Веб-хуки за замовчуванням defaulthooks=Веб-хуки за замовчуванням
@@ -2583,7 +2589,7 @@ config.default_enable_timetracking=Увімкнути відстеження ч
config.default_allow_only_contributors_to_track_time=Враховувати тільки учасників розробки в підрахунку часу config.default_allow_only_contributors_to_track_time=Враховувати тільки учасників розробки в підрахунку часу
config.no_reply_address=Прихований домен електронної пошти config.no_reply_address=Прихований домен електронної пошти
config.default_visibility_organization=Видимість за замовчуванням для нових організацій config.default_visibility_organization=Видимість за замовчуванням для нових організацій
config.default_enable_dependencies=Увімкнути залежності проблем за замовчуванням config.default_enable_dependencies=Увімкнути залежності задачі за замовчуванням
config.webhook_config=Конфігурація web-хуків config.webhook_config=Конфігурація web-хуків
config.queue_length=Довжина черги config.queue_length=Довжина черги
@@ -2738,13 +2744,13 @@ notices.delete_success=Сповіщення системи були видале
create_repo=створив(ла) репозиторій <a href="%s">%s</a> create_repo=створив(ла) репозиторій <a href="%s">%s</a>
rename_repo=репозиторій перейменовано з <code>%[1]s</code> на <a href="%[2]s">%[3]s</a> rename_repo=репозиторій перейменовано з <code>%[1]s</code> на <a href="%[2]s">%[3]s</a>
commit_repo=надіслав зміни (push) до <a href="%[2]s">%[3]s</a> о <a href="%[1]s">%[4]s</a> commit_repo=надіслав зміни (push) до <a href="%[2]s">%[3]s</a> о <a href="%[1]s">%[4]s</a>
create_issue=`відкрив проблему <a href="%[1]s">%[3]s#%[2]s</a>` create_issue=`відкрив задачу <a href="%[1]s">%[3]s#%[2]s</a>`
close_issue=`закрив проблему <a href="%[1]s">%[3]s#%[2]s</a>` close_issue=`закрив задачу <a href="%[1]s">%[3]s#%[2]s</a>`
reopen_issue=`повторно відкрив проблему <a href="%[1]s">%[3]s#%[2]s</a>` reopen_issue=`повторно відкрив задачу <a href="%[1]s">%[3]s#%[2]s</a>`
create_pull_request=`створив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>` create_pull_request=`створив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>`
close_pull_request=`закрив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>` close_pull_request=`закрив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>`
reopen_pull_request=`повторно відкрив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>` reopen_pull_request=`повторно відкрив запит злиття <a href="%[1]s">%[3]s#%[2]s</a>`
comment_issue=`прокоментував проблему <a href="%[1]s">%[3]s#%[2]s</a>` comment_issue=`прокоментував задачу <a href="%[1]s">%[3]s#%[2]s</a>`
comment_pull=`прокоментував запит злиття <a href="%[1]s">%[3]s#%[2]s</a>` comment_pull=`прокоментував запит злиття <a href="%[1]s">%[3]s#%[2]s</a>`
merge_pull_request=`прийняв запит злиття <a href="%[1]s">%[3]s#%[2]s</a>` merge_pull_request=`прийняв запит злиття <a href="%[1]s">%[3]s#%[2]s</a>`
transfer_repo=перенесено репозиторій <code>%s</code> у <a href="%s">%s</a> transfer_repo=перенесено репозиторій <code>%s</code> у <a href="%s">%s</a>

View File

@@ -673,8 +673,8 @@ last_used=上次使用在
no_activity=没有最近活动 no_activity=没有最近活动
can_read_info=读取 can_read_info=读取
can_write_info=写入 can_write_info=写入
key_state_desc=7 天内使用过该密钥 key_state_desc=7 天内使用过该密钥
token_state_desc=7 天内使用过该密钥 token_state_desc=7 天内使用过该密钥
principal_state_desc=7 天内使用过该规则 principal_state_desc=7 天内使用过该规则
show_openid=在个人信息上显示 show_openid=在个人信息上显示
hide_openid=在个人信息上隐藏 hide_openid=在个人信息上隐藏
@@ -855,7 +855,7 @@ watchers=关注者
stargazers=称赞者 stargazers=称赞者
forks=派生仓库 forks=派生仓库
pick_reaction=选择你的表情 pick_reaction=选择你的表情
reactions_more=再加载 %d reactions_more=再加载 %d
unit_disabled=站点管理员已禁用此仓库单元。 unit_disabled=站点管理员已禁用此仓库单元。
language_other=其它 language_other=其它
adopt_search=输入用户名以搜索未被收录的仓库... (留空以查找全部) adopt_search=输入用户名以搜索未被收录的仓库... (留空以查找全部)
@@ -940,14 +940,14 @@ migrate.migrating=正在从 <b>%s</b> 迁移...
migrate.migrating_failed=从 <b>%s</b> 迁移失败。 migrate.migrating_failed=从 <b>%s</b> 迁移失败。
migrate.migrating_failed.error=错误:%s migrate.migrating_failed.error=错误:%s
migrate.migrating_failed_no_addr=迁移失败。 migrate.migrating_failed_no_addr=迁移失败。
migrate.github.description=从 github.com 或其他 GitHub 实例迁移数据 migrate.github.description=从 github.com 或其他 GitHub 实例迁移数据
migrate.git.description=从任意 Git 服务迁移仓库。 migrate.git.description=从任意 Git 服务迁移仓库。
migrate.gitlab.description=从 gitlab.com 或其他 GitLab 实例迁移数据 migrate.gitlab.description=从 gitlab.com 或其他 GitLab 实例迁移数据
migrate.gitea.description=从 gitea.com 或其他 Gitea 实例迁移数据 migrate.gitea.description=从 gitea.com 或其他 Gitea 实例迁移数据
migrate.gogs.description=从 notabug.org 或其他 Gogs 实例迁移数据。 migrate.gogs.description=从 notabug.org 或其他 Gogs 实例迁移数据。
migrate.onedev.description=从 code.onedev.io 或其他 OneDev 实例迁移数据 migrate.onedev.description=从 code.onedev.io 或其他 OneDev 实例迁移数据
migrate.codebase.description=从 codebasehq.com 迁移数据 migrate.codebase.description=从 codebasehq.com 迁移数据
migrate.gitbucket.description=从 GitBucket 实例迁移数据 migrate.gitbucket.description=从 GitBucket 实例迁移数据
migrate.migrating_git=迁移Git数据 migrate.migrating_git=迁移Git数据
migrate.migrating_topics=迁移主题 migrate.migrating_topics=迁移主题
migrate.migrating_milestones=迁移里程碑 migrate.migrating_milestones=迁移里程碑
@@ -1729,7 +1729,7 @@ settings.use_internal_wiki=使用内置百科
settings.use_external_wiki=使用外部百科 settings.use_external_wiki=使用外部百科
settings.external_wiki_url=外部 Wiki 链接 settings.external_wiki_url=外部 Wiki 链接
settings.external_wiki_url_error=外部百科链接无效 settings.external_wiki_url_error=外部百科链接无效
settings.external_wiki_url_desc=当点击工单标签时,访问者将被重定向到外部工单系统的URL。 settings.external_wiki_url_desc=当点击百科标签时,访问者将被重定向到外部百科系统的URL。
settings.issues_desc=启用工单系统 settings.issues_desc=启用工单系统
settings.use_internal_issue_tracker=使用内置的轻量级工单管理系统 settings.use_internal_issue_tracker=使用内置的轻量级工单管理系统
settings.use_external_issue_tracker=使用外部的工单管理系统 settings.use_external_issue_tracker=使用外部的工单管理系统
@@ -2334,7 +2334,7 @@ first_page=首页
last_page=末页 last_page=末页
total=总计:%d total=总计:%d
dashboard.new_version_hint = Gitea %s 可以更新了,您正在运行 %s。请检查 <a target="_blank" rel="noreferrer" href="https://blog.gitea.io">博客</a> 查看更多详情。 dashboard.new_version_hint=Gitea %s 现已可用,您正在运行 %s。查 <a target="_blank" rel="noreferrer" href="https://blog.gitea.io">博客</a> 了解更多详情。
dashboard.statistic=摘要 dashboard.statistic=摘要
dashboard.operations=维护操作 dashboard.operations=维护操作
dashboard.system_status=系统状态 dashboard.system_status=系统状态
@@ -2408,6 +2408,7 @@ dashboard.last_gc_pause=上次 GC 暂停时间
dashboard.gc_times=GC 执行次数 dashboard.gc_times=GC 执行次数
dashboard.delete_old_actions=从数据库中删除所有旧操作记录 dashboard.delete_old_actions=从数据库中删除所有旧操作记录
dashboard.delete_old_actions.started=已开始从数据库中删除所有旧操作记录。 dashboard.delete_old_actions.started=已开始从数据库中删除所有旧操作记录。
dashboard.update_checker=更新检查器
users.user_manage_panel=用户帐户管理 users.user_manage_panel=用户帐户管理
users.new_account=创建新帐户 users.new_account=创建新帐户

View File

@@ -34,6 +34,20 @@ twofa=兩步驟驗證
twofa_scratch=兩步驟驗證備用驗證碼 twofa_scratch=兩步驟驗證備用驗證碼
passcode=驗證碼 passcode=驗證碼
webauthn_insert_key=插入您的安全金鑰
webauthn_sign_in=按下您安全金鑰上的按鈕。如果您的安全金鑰沒有按鈕,請重新插入。
webauthn_press_button=請按下您安全金鑰上的按鈕…
webauthn_use_twofa=使用來自手機的兩步驟驗證碼
webauthn_error=無法讀取您的安全金鑰。
webauthn_unsupported_browser=您的瀏覽器還不支援 WebAuthn。
webauthn_error_unknown=發生未知的錯誤,請再試一次。
webauthn_error_insecure=WebAuthn 只支援安全連線。想在 HTTP 上測試您可以使用「localhost」或「127.0.0.1」
webauthn_error_unable_to_process=伺服器無法執行您的請求。
webauthn_error_duplicated=此請求不允許使用這個安全金鑰。請確保該金鑰尚未註冊。
webauthn_error_empty=您必須命名此金鑰。
webauthn_error_timeout=在成功讀取金鑰之前已逾時,請重新載入此頁面並重試。
webauthn_u2f_deprecated=「%s」金鑰使用已廢棄的 U2F 流程進行驗證。您應該重新註冊此金鑰並將先前註冊的移除。
webauthn_reload=重新載入
repository=儲存庫 repository=儲存庫
organization=組織 organization=組織
@@ -389,8 +403,8 @@ repo.collaborator.added.subject=%s 把您加入到 %s
repo.collaborator.added.text=您已被新增為儲存庫的協作者: repo.collaborator.added.text=您已被新增為儲存庫的協作者:
[modal] [modal]
yes=確認操作 yes=
no=取消操作 no=
modify=更新 modify=更新
[form] [form]
@@ -513,10 +527,11 @@ twofa=兩步驟驗證
account_link=已連結帳號 account_link=已連結帳號
organization=組織 organization=組織
uid=用戶 ID uid=用戶 ID
webauthn=安全金鑰
public_profile=公開的個人資料 public_profile=公開的個人資料
biography_placeholder=告訴我們一些關於你的事 biography_placeholder=告訴我們一些關於你的事
profile_desc=您的電子信箱將被用於通知提醒和其他作。 profile_desc=您的電子信箱將被用於通知提醒和其他作
password_username_disabled=非本地使用者不允許更改他們的帳號。詳細資訊請聯絡您的系統管理員。 password_username_disabled=非本地使用者不允許更改他們的帳號。詳細資訊請聯絡您的系統管理員。
full_name=全名 full_name=全名
website=個人網站 website=個人網站
@@ -530,7 +545,7 @@ update_profile_success=已更新您的個人資料。
change_username=您的帳號已更改。 change_username=您的帳號已更改。
change_username_prompt=注意:修改帳號也會更改您的帳戶的 URL。 change_username_prompt=注意:修改帳號也會更改您的帳戶的 URL。
change_username_redirect_prompt=舊的帳號被領用前,會重新導向您的新帳號。 change_username_redirect_prompt=舊的帳號被領用前,會重新導向您的新帳號。
continue=繼續操作 continue=繼續
cancel=取消 cancel=取消
language=語言 language=語言
ui=佈景主題 ui=佈景主題
@@ -561,7 +576,7 @@ emails=電子信箱
manage_emails=管理電子信箱 manage_emails=管理電子信箱
manage_themes=選擇預設佈景主題 manage_themes=選擇預設佈景主題
manage_openid=管理 OpenID 位址 manage_openid=管理 OpenID 位址
email_desc=您的主要電子信箱將被用於通知提醒和其他作。 email_desc=您的主要電子信箱將被用於通知提醒和其他作
theme_desc=這將是您在整個網站上的預設佈景主題。 theme_desc=這將是您在整個網站上的預設佈景主題。
primary=主要 primary=主要
activated=已啟用 activated=已啟用
@@ -706,7 +721,7 @@ oauth2_regenerate_secret_hint=遺失您的密鑰?
oauth2_client_secret_hint=請備份您的祕鑰。祕鑰在您離開這個頁面後將不會再顯示。 oauth2_client_secret_hint=請備份您的祕鑰。祕鑰在您離開這個頁面後將不會再顯示。
oauth2_application_edit=編輯 oauth2_application_edit=編輯
oauth2_application_create_description=OAuth2 應用程式讓您的第三方應用程式可以存取此 Gitea 上的帳戶。 oauth2_application_create_description=OAuth2 應用程式讓您的第三方應用程式可以存取此 Gitea 上的帳戶。
oauth2_application_remove_description=刪除 OAuth2 應用會拒絕它存取此 Gitea 上已授權的帳戶。是否繼續? oauth2_application_remove_description=刪除 OAuth2 應用程式會拒絕它存取此 Gitea 上已授權的帳戶。是否繼續?
authorized_oauth2_applications=已授權的 OAuth2 應用程式 authorized_oauth2_applications=已授權的 OAuth2 應用程式
authorized_oauth2_applications_description=您已授權給這些第三方應用程式存取您個人 Gitea 帳戶。請對不再需要的應用程式撤銷存取權。 authorized_oauth2_applications_description=您已授權給這些第三方應用程式存取您個人 Gitea 帳戶。請對不再需要的應用程式撤銷存取權。
@@ -733,6 +748,11 @@ passcode_invalid=無效的驗證碼,請重試。
twofa_enrolled=您的帳戶已經啟用了兩步驟驗證。請將備用驗證碼 (%s) 保存到一個安全的地方,它只會顯示這麼一次! twofa_enrolled=您的帳戶已經啟用了兩步驟驗證。請將備用驗證碼 (%s) 保存到一個安全的地方,它只會顯示這麼一次!
twofa_failed_get_secret=取得密鑰Secret失敗。 twofa_failed_get_secret=取得密鑰Secret失敗。
webauthn_desc=安全金鑰是包含加密密鑰的硬體設備,它們可以用於兩步驟驗證。安全金鑰必須支援 <a rel="noreferrer" target="_blank" href="https://w3c.github.io/webauthn/#webauthn-authenticator">WebAuthn Authenticator</a> 標準。
webauthn_register_key=新增安全金鑰
webauthn_nickname=暱稱
webauthn_delete_key=移除安全金鑰
webauthn_delete_key_desc=如果您移除安全金鑰,將不能再使用它登入。是否繼續?
manage_account_links=管理已連結的帳戶 manage_account_links=管理已連結的帳戶
manage_account_links_desc=這些外部帳戶已連結到您的 Gitea 帳戶。 manage_account_links_desc=這些外部帳戶已連結到您的 Gitea 帳戶。
@@ -920,14 +940,14 @@ migrate.migrating=正在從 <b>%s</b> 遷移...
migrate.migrating_failed=從 <b>%s</b> 遷移失敗 migrate.migrating_failed=從 <b>%s</b> 遷移失敗
migrate.migrating_failed.error=錯誤:%s migrate.migrating_failed.error=錯誤:%s
migrate.migrating_failed_no_addr=遷移失敗。 migrate.migrating_failed_no_addr=遷移失敗。
migrate.github.description=從 github.com 或其他 GitHub 實例遷移資料。 migrate.github.description=從 github.com 或其他 GitHub 執行個體遷移資料。
migrate.git.description=從任何 Git 服務遷移儲存庫。 migrate.git.description=從任何 Git 服務遷移儲存庫。
migrate.gitlab.description=從 gitlab.com 或其他 GitLab 實例遷移資料。 migrate.gitlab.description=從 gitlab.com 或其他 GitLab 執行個體遷移資料。
migrate.gitea.description=從 gitea.com 或其他 Gitea 實例遷移資料。 migrate.gitea.description=從 gitea.com 或其他 Gitea 執行個體遷移資料。
migrate.gogs.description=從 notabug.org 或其他 Gogs 實例遷移資料。 migrate.gogs.description=從 notabug.org 或其他 Gogs 執行個體遷移資料。
migrate.onedev.description=從 code.onedev.io 或其他 OneDev 實例遷移資料。 migrate.onedev.description=從 code.onedev.io 或其他 OneDev 執行個體遷移資料。
migrate.codebase.description=從 codebasehq.com 遷移資料。 migrate.codebase.description=從 codebasehq.com 遷移資料。
migrate.gitbucket.description=從 GitBucket 實例遷移資料。 migrate.gitbucket.description=從 GitBucket 執行個體遷移資料。
migrate.migrating_git=正在遷移 Git 資料 migrate.migrating_git=正在遷移 Git 資料
migrate.migrating_topics=正在遷移主題 migrate.migrating_topics=正在遷移主題
migrate.migrating_milestones=正在遷移里程碑 migrate.migrating_milestones=正在遷移里程碑
@@ -956,7 +976,7 @@ clone_this_repo=Clone 此儲存庫
create_new_repo_command=從命令列建立新儲存庫。 create_new_repo_command=從命令列建立新儲存庫。
push_exist_repo=從命令行推送已經建立的儲存庫 push_exist_repo=從命令行推送已經建立的儲存庫
empty_message=此儲存庫未包含任何內容。 empty_message=此儲存庫未包含任何內容。
broken_message=無法讀取此儲存庫底層的 Git 資料。請聯絡此 Gitea 實例的管理員或刪除此儲存庫。 broken_message=無法讀取此儲存庫底層的 Git 資料。請聯絡此 Gitea 執行個體的管理員或刪除此儲存庫。
code=程式碼 code=程式碼
code.desc=存取原始碼、檔案、提交和分支。 code.desc=存取原始碼、檔案、提交和分支。
@@ -1084,7 +1104,7 @@ commits.find=搜尋
commits.search_all=所有分支 commits.search_all=所有分支
commits.author=作者 commits.author=作者
commits.message=備註 commits.message=備註
commits.date=提交日期 commits.date=日期
commits.older=更舊的提交 commits.older=更舊的提交
commits.newer=更新的提交 commits.newer=更新的提交
commits.signed_by=簽署人 commits.signed_by=簽署人
@@ -1132,7 +1152,7 @@ projects.open=開啟
projects.close=關閉 projects.close=關閉
issues.desc=管理錯誤報告、任務和里程碑。 issues.desc=管理錯誤報告、任務和里程碑。
issues.filter_assignees=篩選成員 issues.filter_assignees=篩選負責人
issues.filter_milestones=篩選里程碑 issues.filter_milestones=篩選里程碑
issues.filter_projects=篩選專案 issues.filter_projects=篩選專案
issues.filter_labels=篩選標籤 issues.filter_labels=篩選標籤
@@ -1156,10 +1176,10 @@ issues.new.no_milestone=未選擇里程碑
issues.new.clear_milestone=清除已選取里程碑 issues.new.clear_milestone=清除已選取里程碑
issues.new.open_milestone=開放中的里程碑 issues.new.open_milestone=開放中的里程碑
issues.new.closed_milestone=已關閉的里程碑 issues.new.closed_milestone=已關閉的里程碑
issues.new.assignees=成員 issues.new.assignees=負責人
issues.new.add_assignees_title=指派成員 issues.new.add_assignees_title=指派負責人
issues.new.clear_assignees=清除成員 issues.new.clear_assignees=清除負責人
issues.new.no_assignees=沒有成員 issues.new.no_assignees=沒有負責人
issues.new.no_reviewers=沒有審核者 issues.new.no_reviewers=沒有審核者
issues.new.add_reviewer_title=請求審核 issues.new.add_reviewer_title=請求審核
issues.choose.get_started=開始 issues.choose.get_started=開始
@@ -1205,8 +1225,8 @@ issues.filter_label_exclude=`使用 <code>alt</code> + <code>click/enter</code>
issues.filter_label_no_select=所有標籤 issues.filter_label_no_select=所有標籤
issues.filter_milestone=里程碑 issues.filter_milestone=里程碑
issues.filter_milestone_no_select=所有里程碑 issues.filter_milestone_no_select=所有里程碑
issues.filter_assignee=成員 issues.filter_assignee=負責人
issues.filter_assginee_no_select=所有成員 issues.filter_assginee_no_select=所有負責人
issues.filter_type=類型 issues.filter_type=類型
issues.filter_type.all_issues=所有問題 issues.filter_type.all_issues=所有問題
issues.filter_type.assigned_to_you=指派給您的 issues.filter_type.assigned_to_you=指派給您的
@@ -1231,8 +1251,8 @@ issues.action_close=關閉
issues.action_label=標籤 issues.action_label=標籤
issues.action_milestone=里程碑 issues.action_milestone=里程碑
issues.action_milestone_no_select=無里程碑 issues.action_milestone_no_select=無里程碑
issues.action_assignee=成員 issues.action_assignee=負責人
issues.action_assignee_no_select=沒有成員 issues.action_assignee_no_select=沒有負責人
issues.opened_by=建立於 %[1]s 由 <a href="%[2]s">%[3]s</a> issues.opened_by=建立於 %[1]s 由 <a href="%[2]s">%[3]s</a>
pulls.merged_by=由 <a href="%[2]s">%[3]s</a> 建立,合併於 %[1]s pulls.merged_by=由 <a href="%[2]s">%[3]s</a> 建立,合併於 %[1]s
pulls.merged_by_fake=由 %[2]s 建立,合併於 %[1]s pulls.merged_by_fake=由 %[2]s 建立,合併於 %[1]s
@@ -1411,7 +1431,7 @@ issues.review.hide_resolved=隱藏已解決
issues.review.resolve_conversation=解決對話 issues.review.resolve_conversation=解決對話
issues.review.un_resolve_conversation=取消解決對話 issues.review.un_resolve_conversation=取消解決對話
issues.review.resolved_by=標記了此對話為已解決 issues.review.resolved_by=標記了此對話為已解決
issues.assignee.error=因為未預期的錯誤,未能成功指派所有成員 issues.assignee.error=因為未預期的錯誤,未能成功加入所有負責人
issues.reference_issue.body=內容 issues.reference_issue.body=內容
issues.content_history.deleted=刪除 issues.content_history.deleted=刪除
issues.content_history.edited=編輯 issues.content_history.edited=編輯
@@ -1552,8 +1572,8 @@ milestones.edit_success=已更新里程碑「%s」。
milestones.deletion=刪除里程碑 milestones.deletion=刪除里程碑
milestones.deletion_desc=刪除里程碑會從所有相關的問題移除它。是否繼續? milestones.deletion_desc=刪除里程碑會從所有相關的問題移除它。是否繼續?
milestones.deletion_success=里程碑已刪除 milestones.deletion_success=里程碑已刪除
milestones.filter_sort.closest_due_date=到期日由近到遠 milestones.filter_sort.closest_due_date=截止日期由近到遠
milestones.filter_sort.furthest_due_date=到期日由遠到近 milestones.filter_sort.furthest_due_date=截止日期由遠到近
milestones.filter_sort.least_complete=完成度由低到高 milestones.filter_sort.least_complete=完成度由低到高
milestones.filter_sort.most_complete=完成度由高到低 milestones.filter_sort.most_complete=完成度由高到低
milestones.filter_sort.most_issues=問題由多到少 milestones.filter_sort.most_issues=問題由多到少
@@ -1867,7 +1887,7 @@ settings.event_repository_desc=建立或刪除儲存庫。
settings.event_header_issue=問題事件 settings.event_header_issue=問題事件
settings.event_issues=問題 settings.event_issues=問題
settings.event_issues_desc=建立、編輯、關閉及重新開放問題。 settings.event_issues_desc=建立、編輯、關閉及重新開放問題。
settings.event_issue_assign=指派 settings.event_issue_assign=指派問題
settings.event_issue_assign_desc=指派或取消指派問題。 settings.event_issue_assign_desc=指派或取消指派問題。
settings.event_issue_label=標籤 settings.event_issue_label=標籤
settings.event_issue_label_desc=更新或清除問題標籤。 settings.event_issue_label_desc=更新或清除問題標籤。
@@ -1878,7 +1898,7 @@ settings.event_issue_comment_desc=已經建立、編輯或刪除的問題留言
settings.event_header_pull_request=合併請求事件 settings.event_header_pull_request=合併請求事件
settings.event_pull_request=合併請求 settings.event_pull_request=合併請求
settings.event_pull_request_desc=建立、編輯、關閉及重新開放合併請求。 settings.event_pull_request_desc=建立、編輯、關閉及重新開放合併請求。
settings.event_pull_request_assign=合併請求指派 settings.event_pull_request_assign=指派合併請求
settings.event_pull_request_assign_desc=指派或取消指派合併請求。 settings.event_pull_request_assign_desc=指派或取消指派合併請求。
settings.event_pull_request_label=合併請求標籤 settings.event_pull_request_label=合併請求標籤
settings.event_pull_request_label_desc=更新或清除合併請求標籤。 settings.event_pull_request_label_desc=更新或清除合併請求標籤。
@@ -2314,11 +2334,12 @@ first_page=首頁
last_page=末頁 last_page=末頁
total=總計:%d total=總計:%d
dashboard.new_version_hint=現已推出 Gitea %s您正在執行 %s。查看<a target="_blank" rel="noreferrer" href="https://blog.gitea.io">部落格</a>以獲得更多資訊。
dashboard.statistic=摘要 dashboard.statistic=摘要
dashboard.operations=維護 dashboard.operations=維護作
dashboard.system_status=系統狀態 dashboard.system_status=系統狀態
dashboard.statistic_info=Gitea 資料庫統計:<b>%d</b> 位使用者,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個儲存庫,<b>%d</b> 個儲存庫關注,<b>%d</b> 個星號,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 則留言,<b>%d</b> 個社群帳戶,<b>%d</b> 個用戶關注,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個認證來源,<b>%d</b> 個 Webhook <b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個 Hook 任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。 dashboard.statistic_info=Gitea 資料庫統計:<b>%d</b> 位使用者,<b>%d</b> 個組織,<b>%d</b> 個公鑰,<b>%d</b> 個儲存庫,<b>%d</b> 個儲存庫關注,<b>%d</b> 個星號,<b>%d</b> 次行為,<b>%d</b> 條權限記錄,<b>%d</b> 個問題,<b>%d</b> 則留言,<b>%d</b> 個社群帳戶,<b>%d</b> 個用戶關注,<b>%d</b> 個鏡像,<b>%d</b> 個版本發佈,<b>%d</b> 個認證來源,<b>%d</b> 個 Webhook <b>%d</b> 個里程碑,<b>%d</b> 個標籤,<b>%d</b> 個 Hook 任務,<b>%d</b> 個團隊,<b>%d</b> 個更新任務,<b>%d</b> 個附件。
dashboard.operation_name=作名稱 dashboard.operation_name=名稱
dashboard.operation_switch=開關 dashboard.operation_switch=開關
dashboard.operation_run=執行 dashboard.operation_run=執行
dashboard.clean_unbind_oauth=清理未綁定的 OAuth 連結 dashboard.clean_unbind_oauth=清理未綁定的 OAuth 連結
@@ -2387,6 +2408,7 @@ dashboard.last_gc_pause=上次 GC 暫停時間
dashboard.gc_times=GC 執行次數 dashboard.gc_times=GC 執行次數
dashboard.delete_old_actions=從資料庫刪除所有舊行為 dashboard.delete_old_actions=從資料庫刪除所有舊行為
dashboard.delete_old_actions.started=從資料庫刪除所有舊行為的任務已啟動。 dashboard.delete_old_actions.started=從資料庫刪除所有舊行為的任務已啟動。
dashboard.update_checker=更新檢查器
users.user_manage_panel=使用者帳戶管理 users.user_manage_panel=使用者帳戶管理
users.new_account=建立使用者帳戶 users.new_account=建立使用者帳戶
@@ -2567,7 +2589,7 @@ auths.tips.oauth2.general=OAuth2 認證
auths.tips.oauth2.general.tip=註冊新的 OAuth2 認證時callback/redirect 網址應為:<host>/user/oauth2/<Authentication Name>/callback auths.tips.oauth2.general.tip=註冊新的 OAuth2 認證時callback/redirect 網址應為:<host>/user/oauth2/<Authentication Name>/callback
auths.tip.oauth2_provider=OAuth2 提供者 auths.tip.oauth2_provider=OAuth2 提供者
auths.tip.bitbucket=註冊新的 OAuth 客戶端並加入權限「Account - Read」。網址https://bitbucket.org/account/user/<your username>/oauth-consumers/new auths.tip.bitbucket=註冊新的 OAuth 客戶端並加入權限「Account - Read」。網址https://bitbucket.org/account/user/<your username>/oauth-consumers/new
auths.tip.nextcloud=在您的 Nextcloud 使用「設定 -> 安全性 -> OAuth 2.0 客戶端」註冊新的 OAuth 客戶端 auths.tip.nextcloud=在您的執行個體中,於選單「設定 -> 安全性 -> OAuth 2.0 客戶端」註冊新的 OAuth 客戶端
auths.tip.dropbox=建立一個新的 App。網址https://www.dropbox.com/developers/apps auths.tip.dropbox=建立一個新的 App。網址https://www.dropbox.com/developers/apps
auths.tip.facebook=註冊一個新的應用程式並新增產品「Facebook 登入」。網址https://developers.facebook.com/apps auths.tip.facebook=註冊一個新的應用程式並新增產品「Facebook 登入」。網址https://developers.facebook.com/apps
auths.tip.github=註冊新的 OAuth 應用程式。網址https://github.com/settings/applications/new auths.tip.github=註冊新的 OAuth 應用程式。網址https://github.com/settings/applications/new
@@ -2874,7 +2896,7 @@ notifications=通知
unread=未讀 unread=未讀
read=已讀 read=已讀
no_unread=沒有未讀通知 no_unread=沒有未讀通知
no_read=沒有通知 no_read=沒有已讀通知
pin=固定通知 pin=固定通知
mark_as_read=標記為已讀 mark_as_read=標記為已讀
mark_as_unread=標記為未讀 mark_as_unread=標記為未讀

View File

@@ -43,9 +43,13 @@ func ListUnadoptedRepositories(ctx *context.APIContext) {
// "$ref": "#/responses/forbidden" // "$ref": "#/responses/forbidden"
listOptions := utils.GetListOptions(ctx) listOptions := utils.GetListOptions(ctx)
if listOptions.Page == 0 {
listOptions.Page = 1
}
repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions) repoNames, count, err := repo_service.ListUnadoptedRepositories(ctx.FormString("query"), &listOptions)
if err != nil { if err != nil {
ctx.InternalServerError(err) ctx.InternalServerError(err)
return
} }
ctx.SetTotalCountHeader(int64(count)) ctx.SetTotalCountHeader(int64(count))

View File

@@ -119,6 +119,7 @@ func CreateUser(ctx *context.APIContext) {
user_model.IsErrEmailAlreadyUsed(err) || user_model.IsErrEmailAlreadyUsed(err) ||
db.IsErrNameReserved(err) || db.IsErrNameReserved(err) ||
db.IsErrNameCharsNotAllowed(err) || db.IsErrNameCharsNotAllowed(err) ||
user_model.IsErrEmailCharIsNotSupported(err) ||
user_model.IsErrEmailInvalid(err) || user_model.IsErrEmailInvalid(err) ||
db.IsErrNamePatternNotAllowed(err) { db.IsErrNamePatternNotAllowed(err) {
ctx.Error(http.StatusUnprocessableEntity, "", err) ctx.Error(http.StatusUnprocessableEntity, "", err)
@@ -265,7 +266,9 @@ func EditUser(ctx *context.APIContext) {
} }
if err := user_model.UpdateUser(u, emailChanged); err != nil { if err := user_model.UpdateUser(u, emailChanged); err != nil {
if user_model.IsErrEmailAlreadyUsed(err) || user_model.IsErrEmailInvalid(err) { if user_model.IsErrEmailAlreadyUsed(err) ||
user_model.IsErrEmailCharIsNotSupported(err) ||
user_model.IsErrEmailInvalid(err) {
ctx.Error(http.StatusUnprocessableEntity, "", err) ctx.Error(http.StatusUnprocessableEntity, "", err)
} else { } else {
ctx.Error(http.StatusInternalServerError, "UpdateUser", err) ctx.Error(http.StatusInternalServerError, "UpdateUser", err)

View File

@@ -121,7 +121,7 @@ func ListRepoNotifications(ctx *context.APIContext) {
return return
} }
err = nl.LoadAttributes() err = nl.LoadAttributes()
if err != nil && !models.IsErrCommentNotExist(err) { if err != nil {
ctx.InternalServerError(err) ctx.InternalServerError(err)
return return
} }

View File

@@ -80,7 +80,8 @@ func AddEmail(ctx *context.APIContext) {
if err := user_model.AddEmailAddresses(emails); err != nil { if err := user_model.AddEmailAddresses(emails); err != nil {
if user_model.IsErrEmailAlreadyUsed(err) { if user_model.IsErrEmailAlreadyUsed(err) {
ctx.Error(http.StatusUnprocessableEntity, "", "Email address has been used: "+err.(user_model.ErrEmailAlreadyUsed).Email) ctx.Error(http.StatusUnprocessableEntity, "", "Email address has been used: "+err.(user_model.ErrEmailAlreadyUsed).Email)
} else if user_model.IsErrEmailInvalid(err) { } else if user_model.IsErrEmailCharIsNotSupported(err) ||
user_model.IsErrEmailInvalid(err) {
errMsg := fmt.Sprintf("Email address %s invalid", err.(user_model.ErrEmailInvalid).Email) errMsg := fmt.Sprintf("Email address %s invalid", err.(user_model.ErrEmailInvalid).Email)
ctx.Error(http.StatusUnprocessableEntity, "", errMsg) ctx.Error(http.StatusUnprocessableEntity, "", errMsg)
} else { } else {

View File

@@ -93,7 +93,7 @@ func NewAuthSource(ctx *context.Context) {
ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminAuthentications"] = true ctx.Data["PageIsAdminAuthentications"] = true
ctx.Data["type"] = auth.LDAP ctx.Data["type"] = auth.LDAP.Int()
ctx.Data["CurrentTypeName"] = auth.Names[auth.LDAP] ctx.Data["CurrentTypeName"] = auth.Names[auth.LDAP]
ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted] ctx.Data["CurrentSecurityProtocol"] = ldap.SecurityProtocolNames[ldap.SecurityProtocolUnencrypted]
ctx.Data["smtp_auth"] = "PLAIN" ctx.Data["smtp_auth"] = "PLAIN"
@@ -112,7 +112,7 @@ func NewAuthSource(ctx *context.Context) {
ctx.Data["SSPIDefaultLanguage"] = "" ctx.Data["SSPIDefaultLanguage"] = ""
// only the first as default // only the first as default
ctx.Data["oauth2_provider"] = oauth2providers[0] ctx.Data["oauth2_provider"] = oauth2providers[0].Name
ctx.HTML(http.StatusOK, tplAuthNew) ctx.HTML(http.StatusOK, tplAuthNew)
} }

View File

@@ -41,10 +41,16 @@ func Users(ctx *context.Context) {
ctx.Data["PageIsAdmin"] = true ctx.Data["PageIsAdmin"] = true
ctx.Data["PageIsAdminUsers"] = true ctx.Data["PageIsAdminUsers"] = true
extraParamStrings := map[string]string{}
statusFilterKeys := []string{"is_active", "is_admin", "is_restricted", "is_2fa_enabled", "is_prohibit_login"} statusFilterKeys := []string{"is_active", "is_admin", "is_restricted", "is_2fa_enabled", "is_prohibit_login"}
statusFilterMap := map[string]string{} statusFilterMap := map[string]string{}
for _, filterKey := range statusFilterKeys { for _, filterKey := range statusFilterKeys {
statusFilterMap[filterKey] = ctx.FormString("status_filter[" + filterKey + "]") paramKey := "status_filter[" + filterKey + "]"
paramVal := ctx.FormString(paramKey)
statusFilterMap[filterKey] = paramVal
if paramVal != "" {
extraParamStrings[paramKey] = paramVal
}
} }
sortType := ctx.FormString("sort") sortType := ctx.FormString("sort")
@@ -68,6 +74,7 @@ func Users(ctx *context.Context) {
IsRestricted: util.OptionalBoolParse(statusFilterMap["is_restricted"]), IsRestricted: util.OptionalBoolParse(statusFilterMap["is_restricted"]),
IsTwoFactorEnabled: util.OptionalBoolParse(statusFilterMap["is_2fa_enabled"]), IsTwoFactorEnabled: util.OptionalBoolParse(statusFilterMap["is_2fa_enabled"]),
IsProhibitLogin: util.OptionalBoolParse(statusFilterMap["is_prohibit_login"]), IsProhibitLogin: util.OptionalBoolParse(statusFilterMap["is_prohibit_login"]),
ExtraParamStrings: extraParamStrings,
}, tplUsers) }, tplUsers)
} }
@@ -164,6 +171,9 @@ func NewUserPost(ctx *context.Context) {
case user_model.IsErrEmailAlreadyUsed(err): case user_model.IsErrEmailAlreadyUsed(err):
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserNew, &form) ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserNew, &form)
case user_model.IsErrEmailCharIsNotSupported(err):
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserNew, &form)
case user_model.IsErrEmailInvalid(err): case user_model.IsErrEmailInvalid(err):
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserNew, &form) ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserNew, &form)
@@ -217,15 +227,17 @@ func prepareUserInfo(ctx *context.Context) *user_model.User {
} }
ctx.Data["Sources"] = sources ctx.Data["Sources"] = sources
ctx.Data["TwoFactorEnabled"] = true hasTOTP, err := auth.HasTwoFactorByUID(u.ID)
_, err = auth.GetTwoFactorByUID(u.ID)
if err != nil { if err != nil {
if !auth.IsErrTwoFactorNotEnrolled(err) { ctx.ServerError("auth.HasTwoFactorByUID", err)
ctx.ServerError("IsErrTwoFactorNotEnrolled", err) return nil
return nil
}
ctx.Data["TwoFactorEnabled"] = false
} }
hasWebAuthn, err := auth.HasWebAuthnRegistrationsByUID(u.ID)
if err != nil {
ctx.ServerError("auth.HasWebAuthnRegistrationsByUID", err)
return nil
}
ctx.Data["TwoFactorEnabled"] = hasTOTP || hasWebAuthn
return u return u
} }
@@ -327,14 +339,27 @@ func EditUserPost(ctx *context.Context) {
if form.Reset2FA { if form.Reset2FA {
tf, err := auth.GetTwoFactorByUID(u.ID) tf, err := auth.GetTwoFactorByUID(u.ID)
if err != nil && !auth.IsErrTwoFactorNotEnrolled(err) { if err != nil && !auth.IsErrTwoFactorNotEnrolled(err) {
ctx.ServerError("GetTwoFactorByUID", err) ctx.ServerError("auth.GetTwoFactorByUID", err)
return return
} else if tf != nil {
if err := auth.DeleteTwoFactorByID(tf.ID, u.ID); err != nil {
ctx.ServerError("auth.DeleteTwoFactorByID", err)
return
}
} }
if err = auth.DeleteTwoFactorByID(tf.ID, u.ID); err != nil { wn, err := auth.GetWebAuthnCredentialsByUID(u.ID)
ctx.ServerError("DeleteTwoFactorByID", err) if err != nil {
ctx.ServerError("auth.GetTwoFactorByUID", err)
return return
} }
for _, cred := range wn {
if _, err := auth.DeleteCredential(cred.ID, u.ID); err != nil {
ctx.ServerError("auth.DeleteCredential", err)
return
}
}
} }
u.LoginName = form.LoginName u.LoginName = form.LoginName
@@ -364,7 +389,8 @@ func EditUserPost(ctx *context.Context) {
if user_model.IsErrEmailAlreadyUsed(err) { if user_model.IsErrEmailAlreadyUsed(err) {
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserEdit, &form) ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplUserEdit, &form)
} else if user_model.IsErrEmailInvalid(err) { } else if user_model.IsErrEmailCharIsNotSupported(err) ||
user_model.IsErrEmailInvalid(err) {
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserEdit, &form) ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplUserEdit, &form)
} else { } else {

View File

@@ -573,6 +573,9 @@ func createUserInContext(ctx *context.Context, tpl base.TplName, form interface{
case user_model.IsErrEmailAlreadyUsed(err): case user_model.IsErrEmailAlreadyUsed(err):
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tpl, form) ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tpl, form)
case user_model.IsErrEmailCharIsNotSupported(err):
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tpl, form)
case user_model.IsErrEmailInvalid(err): case user_model.IsErrEmailInvalid(err):
ctx.Data["Err_Email"] = true ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tpl, form) ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tpl, form)

View File

@@ -84,6 +84,9 @@ func RenderUserSearch(ctx *context.Context, opts *user_model.SearchUserOptions,
pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5) pager := context.NewPagination(int(count), opts.PageSize, opts.Page, 5)
pager.SetDefaultParams(ctx) pager.SetDefaultParams(ctx)
for paramKey, paramVal := range opts.ExtraParamStrings {
pager.AddParamString(paramKey, paramVal)
}
ctx.Data["Page"] = pager ctx.Data["Page"] = pager
ctx.HTML(http.StatusOK, tplName) ctx.HTML(http.StatusOK, tplName)

View File

@@ -6,6 +6,7 @@ package org
import ( import (
"net/http" "net/http"
"strings"
"code.gitea.io/gitea/models" "code.gitea.io/gitea/models"
"code.gitea.io/gitea/models/db" "code.gitea.io/gitea/models/db"
@@ -23,7 +24,14 @@ const (
// Home show organization home page // Home show organization home page
func Home(ctx *context.Context) { func Home(ctx *context.Context) {
ctx.SetParams(":org", ctx.Params(":username")) uname := ctx.Params(":username")
if strings.HasSuffix(uname, ".keys") || strings.HasSuffix(uname, ".gpg") {
ctx.NotFound("", nil)
return
}
ctx.SetParams(":org", uname)
context.HandleOrgAssignment(ctx) context.HandleOrgAssignment(ctx)
if ctx.Written() { if ctx.Written() {
return return
@@ -109,7 +117,7 @@ func Home(ctx *context.Context) {
return return
} }
var opts = &models.FindOrgMembersOpts{ opts := &models.FindOrgMembersOpts{
OrgID: org.ID, OrgID: org.ID,
PublicOnly: true, PublicOnly: true,
ListOptions: db.ListOptions{Page: 1, PageSize: 25}, ListOptions: db.ListOptions{Page: 1, PageSize: 25},

View File

@@ -77,8 +77,8 @@ func setPathsCompareContext(ctx *context.Context, base, head *git.Commit, headOw
ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head) ctx.Data["SourcePath"] = SourceCommitURL(headOwner, headName, head)
ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head) ctx.Data["RawPath"] = RawCommitURL(headOwner, headName, head)
if base != nil { if base != nil {
ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, head) ctx.Data["BeforeSourcePath"] = SourceCommitURL(headOwner, headName, base)
ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, head) ctx.Data["BeforeRawPath"] = RawCommitURL(headOwner, headName, base)
} }
} }

View File

@@ -253,6 +253,13 @@ func LFSFileGet(ctx *context.Context) {
} }
ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs" ctx.Data["LFSFilesLink"] = ctx.Repo.RepoLink + "/settings/lfs"
oid := ctx.Params("oid") oid := ctx.Params("oid")
p := lfs.Pointer{Oid: oid}
if !p.IsValid() {
ctx.NotFound("LFSFileGet", nil)
return
}
ctx.Data["Title"] = oid ctx.Data["Title"] = oid
ctx.Data["PageIsSettingsLFS"] = true ctx.Data["PageIsSettingsLFS"] = true
meta, err := models.GetLFSMetaObjectByOid(ctx.Repo.Repository.ID, oid) meta, err := models.GetLFSMetaObjectByOid(ctx.Repo.Repository.ID, oid)
@@ -343,6 +350,12 @@ func LFSDelete(ctx *context.Context) {
return return
} }
oid := ctx.Params("oid") oid := ctx.Params("oid")
p := lfs.Pointer{Oid: oid}
if !p.IsValid() {
ctx.NotFound("LFSDelete", nil)
return
}
count, err := models.RemoveLFSMetaObjectByOid(ctx.Repo.Repository.ID, oid) count, err := models.RemoveLFSMetaObjectByOid(ctx.Repo.Repository.ID, oid)
if err != nil { if err != nil {
ctx.ServerError("LFSDelete", err) ctx.ServerError("LFSDelete", err)

View File

@@ -188,7 +188,8 @@ func EmailPost(ctx *context.Context) {
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSettingsAccount, &form) ctx.RenderWithErr(ctx.Tr("form.email_been_used"), tplSettingsAccount, &form)
return return
} else if user_model.IsErrEmailInvalid(err) { } else if user_model.IsErrEmailCharIsNotSupported(err) ||
user_model.IsErrEmailInvalid(err) {
loadAccountData(ctx) loadAccountData(ctx)
ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSettingsAccount, &form) ctx.RenderWithErr(ctx.Tr("form.email_invalid"), tplSettingsAccount, &form)

View File

@@ -32,7 +32,7 @@ func UserSignIn(username, password string) (*user_model.User, *auth.Source, erro
} }
if !has { if !has {
return nil, nil, user_model.ErrEmailAddressNotExist{ return nil, nil, user_model.ErrEmailAddressNotExist{
Email: user.Email, Email: username,
} }
} }
user = &user_model.User{ID: emailAddress.UID} user = &user_model.User{ID: emailAddress.UID}

View File

@@ -29,19 +29,23 @@ const (
// SyncRequest for the mirror queue // SyncRequest for the mirror queue
type SyncRequest struct { type SyncRequest struct {
Type SyncType Type SyncType
RepoID int64 ReferenceID int64 // RepoID for pull mirror, MirrorID fro push mirror
} }
// doMirrorSync causes this request to mirror itself // doMirrorSync causes this request to mirror itself
func doMirrorSync(ctx context.Context, req *SyncRequest) { func doMirrorSync(ctx context.Context, req *SyncRequest) {
if req.ReferenceID == 0 {
log.Warn("Skipping mirror sync request, no reference ID was specified")
return
}
switch req.Type { switch req.Type {
case PushMirrorType: case PushMirrorType:
_ = SyncPushMirror(ctx, req.RepoID) _ = SyncPushMirror(ctx, req.ReferenceID)
case PullMirrorType: case PullMirrorType:
_ = SyncPullMirror(ctx, req.RepoID) _ = SyncPullMirror(ctx, req.ReferenceID)
default: default:
log.Error("Unknown Request type in queue: %v for RepoID[%d]", req.Type, req.RepoID) log.Error("Unknown Request type in queue: %v for ReferenceID[%d]", req.Type, req.ReferenceID)
} }
} }
@@ -67,8 +71,8 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
} }
repo = m.Repo repo = m.Repo
item = SyncRequest{ item = SyncRequest{
Type: PullMirrorType, Type: PullMirrorType,
RepoID: m.RepoID, ReferenceID: m.RepoID,
} }
} else if m, ok := bean.(*repo_model.PushMirror); ok { } else if m, ok := bean.(*repo_model.PushMirror); ok {
if m.Repo == nil { if m.Repo == nil {
@@ -77,8 +81,8 @@ func Update(ctx context.Context, pullLimit, pushLimit int) error {
} }
repo = m.Repo repo = m.Repo
item = SyncRequest{ item = SyncRequest{
Type: PushMirrorType, Type: PushMirrorType,
RepoID: m.RepoID, ReferenceID: m.ID,
} }
} else { } else {
log.Error("Unknown bean: %v", bean) log.Error("Unknown bean: %v", bean)
@@ -162,8 +166,8 @@ func StartToMirror(repoID int64) {
} }
go func() { go func() {
err := mirrorQueue.Push(&SyncRequest{ err := mirrorQueue.Push(&SyncRequest{
Type: PullMirrorType, Type: PullMirrorType,
RepoID: repoID, ReferenceID: repoID,
}) })
if err != nil { if err != nil {
log.Error("Unable to push sync request for to the queue for push mirror repo[%d]: Error: %v", repoID, err) log.Error("Unable to push sync request for to the queue for push mirror repo[%d]: Error: %v", repoID, err)
@@ -178,8 +182,8 @@ func AddPushMirrorToQueue(mirrorID int64) {
} }
go func() { go func() {
err := mirrorQueue.Push(&SyncRequest{ err := mirrorQueue.Push(&SyncRequest{
Type: PushMirrorType, Type: PushMirrorType,
RepoID: mirrorID, ReferenceID: mirrorID,
}) })
if err != nil { if err != nil {
log.Error("Unable to push sync request to the queue for pull mirror repo[%d]: Error: %v", mirrorID, err) log.Error("Unable to push sync request to the queue for pull mirror repo[%d]: Error: %v", mirrorID, err)

View File

@@ -196,7 +196,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
remoteAddr, remoteErr := git.GetRemoteAddress(ctx, repoPath, m.GetRemoteName()) remoteAddr, remoteErr := git.GetRemoteAddress(ctx, repoPath, m.GetRemoteName())
if remoteErr != nil { if remoteErr != nil {
log.Error("GetRemoteAddress Error %v", remoteErr) log.Error("SyncMirrors [repo: %-v]: GetRemoteAddress Error %v", m.Repo, remoteErr)
} }
stdoutBuilder := strings.Builder{} stdoutBuilder := strings.Builder{}
@@ -215,7 +215,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
// Now check if the error is a resolve reference due to broken reference // Now check if the error is a resolve reference due to broken reference
if strings.Contains(stderr, "unable to resolve reference") && strings.Contains(stderr, "reference broken") { if strings.Contains(stderr, "unable to resolve reference") && strings.Contains(stderr, "reference broken") {
log.Warn("Failed to update mirror repository %-v due to broken references:\nStdout: %s\nStderr: %s\nErr: %v\nAttempting Prune", m.Repo, stdoutMessage, stderrMessage, err) log.Warn("SyncMirrors [repo: %-v]: failed to update mirror repository due to broken references:\nStdout: %s\nStderr: %s\nErr: %v\nAttempting Prune", m.Repo, stdoutMessage, stderrMessage, err)
err = nil err = nil
// Attempt prune // Attempt prune
@@ -240,7 +240,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
// If there is still an error (or there always was an error) // If there is still an error (or there always was an error)
if err != nil { if err != nil {
log.Error("Failed to update mirror repository %-v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) log.Error("SyncMirrors [repo: %-v]: failed to update mirror repository:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err)
desc := fmt.Sprintf("Failed to update mirror repository '%s': %s", repoPath, stderrMessage) desc := fmt.Sprintf("Failed to update mirror repository '%s': %s", repoPath, stderrMessage)
if err = admin_model.CreateRepositoryNotice(desc); err != nil { if err = admin_model.CreateRepositoryNotice(desc); err != nil {
log.Error("CreateRepositoryNotice: %v", err) log.Error("CreateRepositoryNotice: %v", err)
@@ -252,13 +252,13 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
gitRepo, err := git.OpenRepository(repoPath) gitRepo, err := git.OpenRepository(repoPath)
if err != nil { if err != nil {
log.Error("OpenRepository: %v", err) log.Error("SyncMirrors [repo: %-v]: failed to OpenRepository: %v", m.Repo, err)
return nil, false return nil, false
} }
log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo) log.Trace("SyncMirrors [repo: %-v]: syncing releases with tags...", m.Repo)
if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil { if err = repo_module.SyncReleasesWithTags(m.Repo, gitRepo); err != nil {
log.Error("Failed to synchronize tags to releases for repository: %v", err) log.Error("SyncMirrors [repo: %-v]: failed to synchronize tags to releases: %v", m.Repo, err)
} }
if m.LFS && setting.LFS.StartServer { if m.LFS && setting.LFS.StartServer {
@@ -266,14 +266,14 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
endpoint := lfs.DetermineEndpoint(remoteAddr.String(), m.LFSEndpoint) endpoint := lfs.DetermineEndpoint(remoteAddr.String(), m.LFSEndpoint)
lfsClient := lfs.NewClient(endpoint, nil) lfsClient := lfs.NewClient(endpoint, nil)
if err = repo_module.StoreMissingLfsObjectsInRepository(ctx, m.Repo, gitRepo, lfsClient); err != nil { if err = repo_module.StoreMissingLfsObjectsInRepository(ctx, m.Repo, gitRepo, lfsClient); err != nil {
log.Error("Failed to synchronize LFS objects for repository: %v", err) log.Error("SyncMirrors [repo: %-v]: failed to synchronize LFS objects for repository: %v", m.Repo, err)
} }
} }
gitRepo.Close() gitRepo.Close()
log.Trace("SyncMirrors [repo: %-v]: updating size of repository", m.Repo) log.Trace("SyncMirrors [repo: %-v]: updating size of repository", m.Repo)
if err := models.UpdateRepoSize(db.DefaultContext, m.Repo); err != nil { if err := models.UpdateRepoSize(db.DefaultContext, m.Repo); err != nil {
log.Error("Failed to update size for mirror repository: %v", err) log.Error("SyncMirrors [repo: %-v]: failed to update size for mirror repository: %v", m.Repo, err)
} }
if m.Repo.HasWiki() { if m.Repo.HasWiki() {
@@ -291,7 +291,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
remoteAddr, remoteErr := git.GetRemoteAddress(ctx, wikiPath, m.GetRemoteName()) remoteAddr, remoteErr := git.GetRemoteAddress(ctx, wikiPath, m.GetRemoteName())
if remoteErr != nil { if remoteErr != nil {
log.Error("GetRemoteAddress Error %v", remoteErr) log.Error("SyncMirrors [repo: %-v Wiki]: unable to get GetRemoteAddress Error %v", m.Repo, remoteErr)
} }
// sanitize the output, since it may contain the remote address, which may // sanitize the output, since it may contain the remote address, which may
@@ -302,7 +302,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
// Now check if the error is a resolve reference due to broken reference // Now check if the error is a resolve reference due to broken reference
if strings.Contains(stderrMessage, "unable to resolve reference") && strings.Contains(stderrMessage, "reference broken") { if strings.Contains(stderrMessage, "unable to resolve reference") && strings.Contains(stderrMessage, "reference broken") {
log.Warn("Failed to update mirror wiki repository %-v due to broken references:\nStdout: %s\nStderr: %s\nErr: %v\nAttempting Prune", m.Repo, stdoutMessage, stderrMessage, err) log.Warn("SyncMirrors [repo: %-v Wiki]: failed to update mirror wiki repository due to broken references:\nStdout: %s\nStderr: %s\nErr: %v\nAttempting Prune", m.Repo, stdoutMessage, stderrMessage, err)
err = nil err = nil
// Attempt prune // Attempt prune
@@ -325,7 +325,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
// If there is still an error (or there always was an error) // If there is still an error (or there always was an error)
if err != nil { if err != nil {
log.Error("Failed to update mirror repository wiki %-v:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err) log.Error("SyncMirrors [repo: %-v Wiki]: failed to update mirror repository wiki:\nStdout: %s\nStderr: %s\nErr: %v", m.Repo, stdoutMessage, stderrMessage, err)
desc := fmt.Sprintf("Failed to update mirror repository wiki '%s': %s", wikiPath, stderrMessage) desc := fmt.Sprintf("Failed to update mirror repository wiki '%s': %s", wikiPath, stderrMessage)
if err = admin_model.CreateRepositoryNotice(desc); err != nil { if err = admin_model.CreateRepositoryNotice(desc); err != nil {
log.Error("CreateRepositoryNotice: %v", err) log.Error("CreateRepositoryNotice: %v", err)
@@ -339,7 +339,7 @@ func runSync(ctx context.Context, m *repo_model.Mirror) ([]*mirrorSyncResult, bo
log.Trace("SyncMirrors [repo: %-v]: invalidating mirror branch caches...", m.Repo) log.Trace("SyncMirrors [repo: %-v]: invalidating mirror branch caches...", m.Repo)
branches, _, err := git.GetBranchesByPath(m.Repo.RepoPath(), 0, 0) branches, _, err := git.GetBranchesByPath(m.Repo.RepoPath(), 0, 0)
if err != nil { if err != nil {
log.Error("GetBranches: %v", err) log.Error("SyncMirrors [repo: %-v]: failed to GetBranches: %v", m.Repo, err)
return nil, false return nil, false
} }
@@ -360,12 +360,12 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
return return
} }
// There was a panic whilst syncMirrors... // There was a panic whilst syncMirrors...
log.Error("PANIC whilst syncMirrors[%d] Panic: %v\nStacktrace: %s", repoID, err, log.Stack(2)) log.Error("PANIC whilst SyncMirrors[repo_id: %d] Panic: %v\nStacktrace: %s", repoID, err, log.Stack(2))
}() }()
m, err := repo_model.GetMirrorByRepoID(repoID) m, err := repo_model.GetMirrorByRepoID(repoID)
if err != nil { if err != nil {
log.Error("GetMirrorByRepoID [%d]: %v", repoID, err) log.Error("SyncMirrors [repo_id: %v]: unable to GetMirrorByRepoID: %v", repoID, err)
return false return false
} }
@@ -381,7 +381,7 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
log.Trace("SyncMirrors [repo: %-v]: Scheduling next update", m.Repo) log.Trace("SyncMirrors [repo: %-v]: Scheduling next update", m.Repo)
m.ScheduleNextUpdate() m.ScheduleNextUpdate()
if err = repo_model.UpdateMirror(m); err != nil { if err = repo_model.UpdateMirror(m); err != nil {
log.Error("UpdateMirror [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: failed to UpdateMirror with next update date: %v", m.Repo, err)
return false return false
} }
@@ -392,7 +392,7 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
log.Trace("SyncMirrors [repo: %-v]: %d branches updated", m.Repo, len(results)) log.Trace("SyncMirrors [repo: %-v]: %d branches updated", m.Repo, len(results))
gitRepo, err = git.OpenRepositoryCtx(ctx, m.Repo.RepoPath()) gitRepo, err = git.OpenRepositoryCtx(ctx, m.Repo.RepoPath())
if err != nil { if err != nil {
log.Error("OpenRepository [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: unable to OpenRepository: %v", m.Repo, err)
return false return false
} }
defer gitRepo.Close() defer gitRepo.Close()
@@ -419,7 +419,7 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
} }
commitID, err := gitRepo.GetRefCommitID(result.refName) commitID, err := gitRepo.GetRefCommitID(result.refName)
if err != nil { if err != nil {
log.Error("gitRepo.GetRefCommitID [repo_id: %d, ref_name: %s]: %v", m.RepoID, result.refName, err) log.Error("SyncMirrors [repo: %-v]: unable to GetRefCommitID [ref_name: %s]: %v", m.Repo, result.refName, err)
continue continue
} }
notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{ notification.NotifySyncPushCommits(m.Repo.MustOwner(), m.Repo, &repo_module.PushUpdateOptions{
@@ -440,17 +440,17 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
// Push commits // Push commits
oldCommitID, err := git.GetFullCommitID(gitRepo.Path, result.oldCommitID) oldCommitID, err := git.GetFullCommitID(gitRepo.Path, result.oldCommitID)
if err != nil { if err != nil {
log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: unable to get GetFullCommitID[%s]: %v", m.Repo, result.oldCommitID, err)
continue continue
} }
newCommitID, err := git.GetFullCommitID(gitRepo.Path, result.newCommitID) newCommitID, err := git.GetFullCommitID(gitRepo.Path, result.newCommitID)
if err != nil { if err != nil {
log.Error("GetFullCommitID [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: unable to get GetFullCommitID [%s]: %v", m.Repo, result.newCommitID, err)
continue continue
} }
commits, err := gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID) commits, err := gitRepo.CommitsBetweenIDs(newCommitID, oldCommitID)
if err != nil { if err != nil {
log.Error("CommitsBetweenIDs [repo_id: %d, new_commit_id: %s, old_commit_id: %s]: %v", m.RepoID, newCommitID, oldCommitID, err) log.Error("SyncMirrors [repo: %-v]: unable to get CommitsBetweenIDs [new_commit_id: %s, old_commit_id: %s]: %v", m.Repo, newCommitID, oldCommitID, err)
continue continue
} }
@@ -472,12 +472,12 @@ func SyncPullMirror(ctx context.Context, repoID int64) bool {
// Get latest commit date and update to current repository updated time // Get latest commit date and update to current repository updated time
commitDate, err := git.GetLatestCommitTime(m.Repo.RepoPath()) commitDate, err := git.GetLatestCommitTime(m.Repo.RepoPath())
if err != nil { if err != nil {
log.Error("GetLatestCommitDate [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: unable to GetLatestCommitDate: %v", m.Repo, err)
return false return false
} }
if err = repo_model.UpdateRepositoryUpdatedTime(m.RepoID, commitDate); err != nil { if err = repo_model.UpdateRepositoryUpdatedTime(m.RepoID, commitDate); err != nil {
log.Error("Update repository 'updated_unix' [%d]: %v", m.RepoID, err) log.Error("SyncMirrors [repo: %-v]: unable to update repository 'updated_unix': %v", m.Repo, err)
return false return false
} }

View File

@@ -14,7 +14,7 @@
<div class="inline required field {{if .Err_Type}}error{{end}}"> <div class="inline required field {{if .Err_Type}}error{{end}}">
<label>{{.i18n.Tr "admin.auths.auth_type"}}</label> <label>{{.i18n.Tr "admin.auths.auth_type"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="auth_type" name="type" value="{{.type.Int}}"> <input type="hidden" id="auth_type" name="type" value="{{.type}}">
<div class="text">{{.CurrentTypeName}}</div> <div class="text">{{.CurrentTypeName}}</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">

View File

@@ -2,8 +2,8 @@
<div class="inline required field"> <div class="inline required field">
<label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label> <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label>
<div class="ui selection type dropdown"> <div class="ui selection type dropdown">
<input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider.Name}}"> <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}">
<div class="text">{{.oauth2_provider.Name}}</div> <div class="text">{{.oauth2_provider}}</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}} {{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu"> <div class="menu">
{{range .OAuth2Providers}} {{range .OAuth2Providers}}

View File

@@ -5,7 +5,7 @@
{{template "base/alert" .}} {{template "base/alert" .}}
{{if .NeedUpdate}} {{if .NeedUpdate}}
<div class="ui negative message flash-error"> <div class="ui negative message flash-error">
<p>{{.i18n.Tr "admin.dashboard.new_version_hint" (.RemoteVersion | Str2html) (AppVer | Str2html)}}</p> <p>{{(.i18n.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
</div> </div>
{{end}} {{end}}
<h4 class="ui top attached header"> <h4 class="ui top attached header">

View File

@@ -26,7 +26,7 @@
<div class="ui bottom attached table segment members"> <div class="ui bottom attached table segment members">
{{range .Team.Members}} {{range .Team.Members}}
<div class="item"> <div class="item">
{{if and $.IsOrganizationOwner (not (eq $.SignedUser.ID .ID))}} {{if and $.IsOrganizationOwner (not (and ($.Team.IsOwnerTeam) (eq (len $.Team.Members) 1)))}}
<form> <form>
<button class="ui red button delete-button right" data-modal-id="remove-team-member" <button class="ui red button delete-button right" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"

View File

@@ -44,10 +44,10 @@
</ul> </ul>
{{if (eq .Team.AccessMode 2)}} {{if (eq .Team.AccessMode 2)}}
<h3>{{.i18n.Tr "org.settings.permission"}}</h3> <h3>{{.i18n.Tr "org.settings.permission"}}</h3>
{{.i18n.Tr "org.teams.write_permission_desc"}} {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
{{else if (eq .Team.AccessMode 3)}} {{else if (eq .Team.AccessMode 3)}}
<h3>{{.i18n.Tr "org.settings.permission"}}</h3> <h3>{{.i18n.Tr "org.settings.permission"}}</h3>
{{.i18n.Tr "org.teams.admin_permission_desc"}} {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
{{else}} {{else}}
<table class="ui table"> <table class="ui table">
<thead> <thead>
@@ -74,8 +74,8 @@
</tbody> </tbody>
</table> </table>
{{end}} {{end}}
{{end}} </div>
</div> {{end}}
</div> </div>
{{if .IsOrganizationOwner}} {{if .IsOrganizationOwner}}
<div class="ui bottom attached segment"> <div class="ui bottom attached segment">

View File

@@ -24,7 +24,7 @@
<td> <td>
{{if index $.Linkable $index}} {{if index $.Linkable $index}}
{{svg "octicon-file"}} {{svg "octicon-file"}}
<a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $lock.Repo.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a> <a href="{{$.RepoLink}}/src/branch/{{PathEscapeSegments $.Repository.DefaultBranch}}/{{PathEscapeSegments $lock.Path}}" title="{{$lock.Path}}">{{$lock.Path}}</a>
{{else}} {{else}}
{{svg "octicon-diff"}} {{svg "octicon-diff"}}
<span class="tooltip" title="{{$.i18n.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span> <span class="tooltip" title="{{$.i18n.Tr "repo.settings.lfs_lock_file_no_exist"}}">{{$lock.Path}}</span>
@@ -34,9 +34,9 @@
{{end}} {{end}}
</td> </td>
<td> <td>
<a href="{{$lock.Owner.HomeLink}}"> <a href="{{$.Owner.HomeLink}}">
{{avatar $lock.Owner}} {{avatar $.Owner}}
{{$lock.Owner.DisplayName}} {{$.Owner.DisplayName}}
</a> </a>
</td> </td>
<td>{{TimeSince .Created $.Lang}}</td> <td>{{TimeSince .Created $.Lang}}</td>

View File

@@ -125,7 +125,7 @@
<div class="column"> <div class="column">
{{if $.Permission.CanRead $.UnitTypeIssues}} {{if $.Permission.CanRead $.UnitTypeIssues}}
<div class="ui link list"> <div class="ui link list">
<a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/" }}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}">{{.i18n.Tr "repo.issues.context.reference_issue"}}</a> <a class="item ref-in-new-issue" href="{{.RepoLink}}/issues/new?body={{.Repository.HTMLURL}}{{printf "/src/commit/" }}{{PathEscape .CommitID}}/{{PathEscapeSegments .TreePath}}" rel="nofollow noindex">{{.i18n.Tr "repo.issues.context.reference_issue"}}</a>
</div> </div>
{{end}} {{end}}
<div class="ui link list"> <div class="ui link list">

View File

@@ -461,7 +461,7 @@ export function initRepoPullRequestReview() {
(async () => { (async () => {
// the editor's height is too large in some cases, and the panel cannot be scrolled with page now because there is `.repository .diff-detail-box.sticky { position: sticky; }` // the editor's height is too large in some cases, and the panel cannot be scrolled with page now because there is `.repository .diff-detail-box.sticky { position: sticky; }`
// the temporary solution is to make the editor's height smaller (about 4 lines). GitHub also only show 4 lines for default. We can improve the UI (including Dropzone area) in future // the temporary solution is to make the editor's height smaller (about 4 lines). GitHub also only show 4 lines for default. We can improve the UI (including Dropzone area) in future
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'}); await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px', maxHeight: 'calc(100vh - 360px)'});
initCompImagePaste($reviewBox); initCompImagePaste($reviewBox);
})(); })();
} }