-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
improve welcome message #680
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also replace all the println
by eprintln
s, please! Those are debug informations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems great, can you rebase, this way I can merge, please?
735661f
to
a69fdd9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
info!("If you want to support us or help us; Please consult our Github repo: http://github.com/meilisearch/meilisearch"); | ||
info!("If you want to contact us; Please chat with us on http://meilisearch.com or by email to [email protected]"); | ||
eprintln!(); | ||
eprintln!("Documentation:\t\thttp://docs.meilisearch.com"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("Documentation:\t\thttp://docs.meilisearch.com"); | |
eprintln!("Documentation:\t\thttps://docs.meilisearch.com"); |
info!("If you want to contact us; Please chat with us on http://meilisearch.com or by email to [email protected]"); | ||
eprintln!(); | ||
eprintln!("Documentation:\t\thttp://docs.meilisearch.com"); | ||
eprintln!("Source code:\t\thttp://github.com/meilisearch/meilisearch"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("Source code:\t\thttp://github.com/meilisearch/meilisearch"); | |
eprintln!("Source code:\t\thttps://github.com/meilisearch/MeiliSearch"); |
meilisearch-http/src/main.rs
Outdated
env!("CARGO_PKG_VERSION").to_string() | ||
); | ||
|
||
eprintln!(); | ||
|
||
if let Some(master_key) = &data.api_keys.master { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might not be pertinent in this PR, but isn't it unsafe to put the Master key (and maybe private/public keys) in the logs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure why @qdequele have done this, but yeah it can be unsafe if any user have access to the logs of the running server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I create an issue on this? (separate issue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix this here, seems related enough
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to create a suggestion, but it gets messy as it is done over a mix of removed and added lines. The main idea is just to tell the user that a Master key was set, and that he needs authentication for requests, but deleting all the logs with sensitive keys inside ;)
meilisearch-http/src/main.rs
Outdated
if let Some(master_key) = &data.api_keys.master { | ||
info!("Master Key: {:?}", master_key); | ||
eprintln!("Master Key:\t{:?}", master_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("Master Key:\t{:?}", master_key); | |
eprintln!("A Master Key has been set. Requests to MeiliSearch won't be authorized unless you provide an authentication key."); |
meilisearch-http/src/main.rs
Outdated
if let Some(master_key) = &data.api_keys.master { | ||
info!("Master Key: {:?}", master_key); | ||
eprintln!("Master Key:\t{:?}", master_key); | ||
|
||
if let Some(private_key) = &data.api_keys.private { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if let Some(private_key) = &data.api_keys.private { |
meilisearch-http/src/main.rs
Outdated
|
||
if let Some(private_key) = &data.api_keys.private { | ||
info!("Private Key: {:?}", private_key); | ||
eprintln!("Private Key:\t{:?}", private_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("Private Key:\t{:?}", private_key); |
meilisearch-http/src/main.rs
Outdated
} | ||
|
||
if let Some(public_key) = &data.api_keys.public { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | |
if let Some(public_key) = &data.api_keys.public { |
meilisearch-http/src/main.rs
Outdated
} | ||
|
||
if let Some(public_key) = &data.api_keys.public { | ||
info!("Public Key: {:?}", public_key); | ||
eprintln!("Public Key:\t{:?}", public_key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("Public Key:\t{:?}", public_key); |
meilisearch-http/src/main.rs
Outdated
} | ||
|
||
if let Some(public_key) = &data.api_keys.public { | ||
info!("Public Key: {:?}", public_key); | ||
eprintln!("Public Key:\t{:?}", public_key); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} |
Hold on, that's breaking! if you set the master key, private and public are generated automatically, and printed on startup... @qdequele what do we do? |
I think you can hide keys on logs. It's not necessary. For me, It's not really breaking because that is just comments and not an interactive functionality. It's the same as changing the command line parameter descriptions. What do you think? |
How is the user supposed to retrieve the private and public keys that are set by default? |
With the |
abcf11d
to
140fd68
Compare
all good |
Can you rebase, please? I merge just after. |
140fd68
to
a1d20ea
Compare
done |
fixes #663