forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (28 commits) Improve TrHTML and add more tests (go-gitea#29228) Convert visibility to number (go-gitea#29226) Implement some action notifier functions (go-gitea#29173) Artifact deletion in actions ui (go-gitea#27172) Update docs for actions variables (go-gitea#29239) Refactor more code in templates (go-gitea#29236) Use "Safe" modifier for manually constructed safe HTML strings in templates (go-gitea#29227) Remove jQuery from the repo release form (go-gitea#29225) Make submit event code work with both jQuery event and native event (go-gitea#29223) Remove jQuery from repo migrate page (go-gitea#29219) Remove unneccesary `initUserAuthLinkAccountView` from "link account" page (go-gitea#29217) Fix labels referencing the wrong ID in the user profile settings (go-gitea#29199) Fix label `for` pointing to a `name` instead of `id` in webhook settings (go-gitea#29209) Load outdated comments when (un)resolving conversation on PR timeline (go-gitea#29203) Fix missing template for follow button in organization (go-gitea#29215) Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` (go-gitea#29214) Remove jQuery from the webhook editor (go-gitea#29211) Remove jQuery from issue reference context popup attach (go-gitea#29216) fix typo (go-gitea#29212) Fix debian InRelease Acquire-By-Hash newline (go-gitea#29204) ...
- Loading branch information
Showing
86 changed files
with
1,646 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ curl "http://localhost:4000/api/v1/repos/test1/test1/issues" \ | |
`/users/:name/tokens` 是一个特殊的接口,需要您使用 basic authentication 进行认证,具体原因在 issue 中 | ||
[#3842](https://github.com/go-gitea/gitea/issues/3842#issuecomment-397743346) 有所提及,使用方法如下所示: | ||
|
||
### 使用 Basic authentication 认证: | ||
### 使用 Basic authentication 认证 | ||
|
||
``` | ||
$ curl --url https://yourusername:[email protected]/api/v1/users/yourusername/tokens | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright 2024 The Gitea Authors. All rights reserved. | ||
// SPDX-License-Identifier: MIT | ||
|
||
package generate | ||
|
||
import ( | ||
"encoding/base64" | ||
"strings" | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestDecodeJwtSecretBase64(t *testing.T) { | ||
_, err := DecodeJwtSecretBase64("abcd") | ||
assert.ErrorContains(t, err, "invalid base64 decoded length") | ||
_, err = DecodeJwtSecretBase64(strings.Repeat("a", 64)) | ||
assert.ErrorContains(t, err, "invalid base64 decoded length") | ||
|
||
str32 := strings.Repeat("x", 32) | ||
encoded32 := base64.RawURLEncoding.EncodeToString([]byte(str32)) | ||
decoded32, err := DecodeJwtSecretBase64(encoded32) | ||
assert.NoError(t, err) | ||
assert.Equal(t, str32, string(decoded32)) | ||
} | ||
|
||
func TestNewJwtSecretWithBase64(t *testing.T) { | ||
secret, encoded, err := NewJwtSecretWithBase64() | ||
assert.NoError(t, err) | ||
assert.Len(t, secret, 32) | ||
decoded, err := DecodeJwtSecretBase64(encoded) | ||
assert.NoError(t, err) | ||
assert.Equal(t, secret, decoded) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.