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>
2023-05-16 03:33:47 -04:00
..
admin Fix 500 error if there is a name conflict when edit authentication source (#23832) (#23852) 2023-03-31 12:53:25 -04:00
auth Respect the REGISTER_MANUAL_CONFIRM setting when registering via OIDC (#24035) (#24333) 2023-04-25 15:25:08 -04:00
events
explore
feed User/Org Feed render description as per web (#23887) (#23906) 2023-04-04 00:44:50 -04:00
healthcheck
misc
org Fix close org projects (#24588) (#24591) 2023-05-08 20:50:27 +02:00
repo fix: release page for empty or non-existing target (#24659) 2023-05-12 14:14:41 -04:00
shared Respect original content when creating secrets (#24745) (#24746) 2023-05-16 03:33:47 -04:00
user Only delete secrets belonging to its owner (#24284) (#24286) 2023-04-23 16:36:20 +02:00
auth_windows.go
auth.go
base.go
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go
web.go getting the tag list does not require being signed in (#24413) (#24416) 2023-04-29 09:43:37 +02:00
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) (#23905) 2023-04-03 22:41:57 -05:00