refactor: require an explicit database username
This commit is contained in:
+1
-2
@@ -85,12 +85,11 @@ struct Form {
|
|||||||
|
|
||||||
impl Default for Form {
|
impl Default for Form {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
let user = std::env::var("USER").unwrap_or_default();
|
|
||||||
Self {
|
Self {
|
||||||
provider: 0,
|
provider: 0,
|
||||||
focus: 0,
|
focus: 0,
|
||||||
tls: 0,
|
tls: 0,
|
||||||
postgres: ["localhost", "5432", "postgres", &user, ""].map(Input::from),
|
postgres: ["localhost", "5432", "postgres", "", ""].map(Input::from),
|
||||||
path: Input::default(),
|
path: Input::default(),
|
||||||
error: None,
|
error: None,
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -40,6 +40,7 @@ Navigation:
|
|||||||
Tab/Shift-Tab changes fields; Left/Right changes TLS when that field is focused.
|
Tab/Shift-Tab changes fields; Left/Right changes TLS when that field is focused.
|
||||||
Enter connects; Esc cancels; Ctrl-U clears a field. Pasting is supported.
|
Enter connects; Esc cancels; Ctrl-U clears a field. Pasting is supported.
|
||||||
Form details are session-only. Passwords clear after connecting or cancelling.
|
Form details are session-only. Passwords clear after connecting or cancelling.
|
||||||
|
Enter the database user explicitly; the operating-system username is not used.
|
||||||
|
|
||||||
PostgreSQL reads are enforced read-only and have a 5-second query timeout.
|
PostgreSQL reads are enforced read-only and have a 5-second query timeout.
|
||||||
SQLite files are opened read-only, with a 5-second lock wait but no query timeout.
|
SQLite files are opened read-only, with a 5-second lock wait but no query timeout.
|
||||||
|
|||||||
Reference in New Issue
Block a user