Skip to content
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

Added quoting for passwords in sample.app.ini and documentation #3395

Merged
merged 7 commits into from
Jan 27, 2018
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions custom/conf/app.ini.sample
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ DB_TYPE = mysql
HOST = 127.0.0.1:3306
NAME = gitea
USER = root
; Use PASSWD = `your password` for quoting, if you use special characters in the password.
PASSWD =
; For "postgres" only, either "disable", "require" or "verify-full"
SSL_MODE = disable
Expand Down Expand Up @@ -342,6 +343,7 @@ KEY_FILE = custom/mailer/key.pem
FROM =
; Mailer user name and password
USER =
; Use PASSWD = `your password` for quoting, if you use special characters in the password.
PASSWD =
; Send mails as plain text
SEND_AS_PLAIN_TEXT = false
Expand Down Expand Up @@ -464,6 +466,7 @@ SUBJECT = Diagnostic message from server
HOST =
; Mailer user name and password
USER =
; Use PASSWD = `your password` for quoting, if you use special characters in the password.
PASSWD =
; Receivers, can be one or more, e.g. 1@example.com,2@example.com
RECEIVERS =
Expand Down
4 changes: 2 additions & 2 deletions docs/content/doc/advanced/config-cheat-sheet.en-us.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
- `HOST`: **127.0.0.1:3306**: Database host address and port.
- `NAME`: **gitea**: Database name.
- `USER`: **root**: Database username.
- `PASSWD`: **\<empty\>**: Database user password.
- `PASSWD`: **\`\<empty\>\`**: Database user password. Use \`your password\` for quoting, if you use special characters in the password.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look correct to quote <empty> ...

- `SSL_MODE`: **disable**: For PostgreSQL only.
- `PATH`: **data/gitea.db**: For SQLite3 only, the database file path.

Expand Down Expand Up @@ -185,7 +185,7 @@ Values containing `#` or `;` must be quoted using `` ` `` or `"""`.
- `FROM`: **\<empty\>**: Mail from address, RFC 5322. This can be just an email address, or
the "Name" \<email@example.com\> format.
- `USER`: **\<empty\>**: Username of mailing user (usually the sender's e-mail address).
- `PASSWD`: **\<empty\>**: Password of mailing user.
- `PASSWD`: **\`\<empty\>\`**: Password of mailing user. Use \`your password\` for quoting, if you use special characters in the password.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quoting <empty> is unlikely correct, it's not a password, is an indication to the user that there's NOTHING written as a password...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this hint. Should be also enough to just write it in the comment. Backtick schould be the right quotation and works for both.

- `SKIP_VERIFY`: **\<empty\>**: Do not verify the self-signed certificates.
- **Note:** Gitea only supports SMTP with STARTTLS.
- `USE_SENDMAIL`: **false** Use the operating system's `sendmail` command instead of SMTP.
Expand Down