Skip to content

Commit e9c182d

Browse files
authored
Merge branch 'main' into fix-before_commit_three_dot
2 parents 4a2875c + 7eaf192 commit e9c182d

File tree

122 files changed

+1250
-447
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

122 files changed

+1250
-447
lines changed

.eslintrc.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ rules:
149149
jquery/no-global-eval: [2]
150150
jquery/no-grep: [2]
151151
jquery/no-has: [2]
152-
jquery/no-hide: [0]
152+
jquery/no-hide: [2]
153153
jquery/no-html: [0]
154154
jquery/no-in-array: [2]
155155
jquery/no-is-array: [2]
@@ -166,13 +166,13 @@ rules:
166166
jquery/no-proxy: [2]
167167
jquery/no-ready: [0]
168168
jquery/no-serialize: [2]
169-
jquery/no-show: [0]
169+
jquery/no-show: [2]
170170
jquery/no-size: [2]
171171
jquery/no-sizzle: [0]
172172
jquery/no-slide: [0]
173173
jquery/no-submit: [0]
174174
jquery/no-text: [0]
175-
jquery/no-toggle: [0]
175+
jquery/no-toggle: [2]
176176
jquery/no-trigger: [0]
177177
jquery/no-trim: [2]
178178
jquery/no-val: [0]

cmd/admin_user_change_password.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"fmt"
1010

1111
user_model "code.gitea.io/gitea/models/user"
12-
pwd "code.gitea.io/gitea/modules/password"
12+
pwd "code.gitea.io/gitea/modules/auth/password"
1313
"code.gitea.io/gitea/modules/setting"
1414

1515
"github.com/urfave/cli"

cmd/admin_user_create.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010

1111
auth_model "code.gitea.io/gitea/models/auth"
1212
user_model "code.gitea.io/gitea/models/user"
13-
pwd "code.gitea.io/gitea/modules/password"
13+
pwd "code.gitea.io/gitea/modules/auth/password"
1414
"code.gitea.io/gitea/modules/setting"
1515
"code.gitea.io/gitea/modules/util"
1616

docs/content/doc/advanced/config-cheat-sheet.en-us.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,22 @@ Certain queues have defaults that override the defaults set in `[queue]` (this o
568568
- `IMPORT_LOCAL_PATHS`: **false**: Set to `false` to prevent all users (including admin) from importing local path on server.
569569
- `INTERNAL_TOKEN`: **\<random at every install if no uri set\>**: Secret used to validate communication within Gitea binary.
570570
- `INTERNAL_TOKEN_URI`: **<empty>**: Instead of defining INTERNAL_TOKEN in the configuration, this configuration option can be used to give Gitea a path to a file that contains the internal token (example value: `file:/etc/gitea/internal_token`)
571-
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, scrypt, bcrypt\], argon2 will spend more memory than others.
571+
- `PASSWORD_HASH_ALGO`: **pbkdf2**: The hash algorithm to use \[argon2, pbkdf2, pbkdf2_v1, pbkdf2_hi, scrypt, bcrypt\], argon2 and scrypt will spend significant amounts of memory.
572+
- Note: The default parameters for `pbkdf2` hashing have changed - the previous settings are available as `pbkdf2_v1` but are not recommended.
573+
- The hash functions may be tuned by using `$` after the algorithm:
574+
- `argon2$<time>$<memory>$<threads>$<key-length>`
575+
- `bcrypt$<cost>`
576+
- `pbkdf2$<iterations>$<key-length>`
577+
- `scrypt$<n>$<r>$<p>$<key-length>`
578+
- The defaults are:
579+
- `argon2`: `argon2$2$65536$8$50`
580+
- `bcrypt`: `bcrypt$10`
581+
- `pbkdf2`: `pbkdf2$50000$50`
582+
- `pbkdf2_v1`: `pbkdf2$10000$50`
583+
- `pbkdf2_v2`: `pbkdf2$50000$50`
584+
- `pbkdf2_hi`: `pbkdf2$320000$50`
585+
- `scrypt`: `scrypt$65536$16$2$50`
586+
- Adjusting the algorithm parameters using this functionality is done at your own risk.
572587
- `CSRF_COOKIE_HTTP_ONLY`: **true**: Set false to allow JavaScript to read CSRF cookie.
573588
- `MIN_PASSWORD_LENGTH`: **6**: Minimum password length for new users.
574589
- `PASSWORD_COMPLEXITY`: **off**: Comma separated list of character classes required to pass minimum complexity. If left empty or no valid values are specified, checking is disabled (off):

docs/content/doc/developers/guidelines-frontend.en-us.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ However, there are still some special cases, so the current guideline is:
9393
* `node.dataset` should not be used, use `node.getAttribute` instead.
9494
* never bind any user data to a DOM node, use a suitable design pattern to describe the relation between node and data.
9595

96+
### Show/Hide Elements
97+
98+
* Vue components are recommended to use `v-if` and `v-show` to show/hide elements.
99+
* Go template code should use Gitea's `.gt-hidden` and `showElem()/hideElem()/toggleElem()`, see more details in `.gt-hidden`'s comment.
100+
96101
### Legacy Code
97102

98103
A lot of legacy code already existed before this document's written. It's recommended to refactor legacy code to follow the guidelines.

0 commit comments

Comments
 (0)