You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gitea/routers/web
Giteabot e4f200e616
Respect original content when creating secrets (#24745) (#24746)
Backport #24745 by @wolfogre

Fix #24721.

Follow what GitHub does:
- Don't trim spaces for secrets.
- Newline should be `\n` instead of `\r\n`.

Did some tests with:

```yaml
name: secrets
on: push
jobs:
  show_secrets:
    runs-on: ubuntu-latest
    steps:
      - name: Dump secrets context
        run: echo '${{ toJSON(secrets) }}' | base64
```

`AAAAAA`:
```text
   AAAAAA
AAAAAA


```
`BBBBBB`:
```text



BBBBBB
BBBBBB   
```


On GitHub:

<img width="675" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0ec60652-c2a3-47bb-9f9d-7e81665355a8">


On Gitea (before):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/cce818bf-5edc-4656-86e1-2c81c304cdb2">

On Gitea (after):

<img width="673" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/0b3b15af-4d48-4bab-a334-4738a1b0eb4a">

Co-authored-by: Jason Song <i@wolfogre.com>
2 years ago
..
admin Fix 500 error if there is a name conflict when edit authentication source (#23832) (#23852) 2 years ago
auth Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035) (#24333) 2 years ago
events Implement FSFE REUSE for golang files (#21840) 2 years ago
explore Add ONLY_SHOW_RELEVANT_REPOS back, fix explore page bug, make code more strict (#23766) (#23791) 2 years ago
feed User/Org Feed render description as per web (#23887) (#23906) 2 years ago
healthcheck Refactor `setting.Database.UseXXX` to methods (#23354) (#23356) 2 years ago
misc Implement FSFE REUSE for golang files (#21840) 2 years ago
org Fix close org projects (#24588) (#24591) 2 years ago
repo fix: release page for empty or non-existing target (#24659) 2 years ago
shared Respect original content when creating secrets (#24745) (#24746) 2 years ago
user Only delete secrets belonging to its owner (#24284) (#24286) 2 years ago
auth.go Implement FSFE REUSE for golang files (#21840) 2 years ago
auth_windows.go Implement FSFE REUSE for golang files (#21840) 2 years ago
base.go Set `X-Gitea-Debug` header once (#23361) (#23381) 2 years ago
goget.go refactor some functions to support ctx as first parameter (#21878) 2 years ago
home.go Implement FSFE REUSE for golang files (#21840) 2 years ago
metrics.go Implement FSFE REUSE for golang files (#21840) 2 years ago
nodeinfo.go Implement FSFE REUSE for golang files (#21840) 2 years ago
swagger_json.go Implement FSFE REUSE for golang files (#21840) 2 years ago
web.go getting the tag list does not require being signed in (#24413) (#24416) 2 years ago
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) (#23905) 2 years ago