-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gitea doesn't handle newline ('\n') in file specified by INTERNAL_TOKEN_URI #11498
Closed
2 of 7 tasks
Labels
Comments
I also note that this uses ioutil.ReadAll which will not work on Symlinks... |
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
May 19, 2020
InternalTokens are fixed as alphanum strings therefore TrimSpace from these. Also use isatty to not add a terminal newline when redirecting generate. Fix go-gitea#11498 Signed-off-by: Andrew Thornton <[email protected]>
lafriks
added a commit
that referenced
this issue
May 20, 2020
InternalTokens are fixed as alphanum strings therefore TrimSpace from these. Also use isatty to not add a terminal newline when redirecting generate. Fix #11498 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]>
zeripath
added a commit
to zeripath/gitea
that referenced
this issue
May 20, 2020
InternalTokens are fixed as alphanum strings therefore TrimSpace from these. Also use isatty to not add a terminal newline when redirecting generate. Fix go-gitea#11498 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]>
techknowlogick
pushed a commit
that referenced
this issue
May 20, 2020
InternalTokens are fixed as alphanum strings therefore TrimSpace from these. Also use isatty to not add a terminal newline when redirecting generate. Fix #11498 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]> Co-authored-by: Lauris BH <[email protected]>
ydelafollye
pushed a commit
to ydelafollye/gitea
that referenced
this issue
Jul 31, 2020
InternalTokens are fixed as alphanum strings therefore TrimSpace from these. Also use isatty to not add a terminal newline when redirecting generate. Fix go-gitea#11498 Signed-off-by: Andrew Thornton <[email protected]> Co-authored-by: Lauris BH <[email protected]>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
[x]
):Description
If the content in the file referenced by INTERNAL_TOKEN_URI ends with a newline, all commits fail with an internal server error.
As
gitea generate secret
appends a newline to its output, this means that, (where app.ini containsINTERNAL_TOKEN_URI = file:/data/gitea/conf/internal-token
), generating this file as below will cause this error:Screenshots
The text was updated successfully, but these errors were encountered: