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

[FIX] User Suggestions & Bug Fixes #663

Merged
merged 26 commits into from
May 20, 2022
Merged

Conversation

Lissy93
Copy link
Owner

@Lissy93 Lissy93 commented May 19, 2022

🐛 Fix Medium Lissy93 /FIX/user-suggestions-fixes-2.0.9 → Lissy93/dashy Commits: 26 | Files Changed: 32 | Additions: 133 Category Overview

Code Quality Checklist (Please complete)

  • All changes are backwards compatible
  • All lint checks and tests are passing
  • There are no (new) build warnings or errors
  • (If a new config option is added) Attribute is outlined in the schema and documented
  • (If a new dependency is added) Package is essential, and has been checked out for security or performance
  • Bumps version, if new feature added

@netlify
Copy link

netlify bot commented May 19, 2022

Deploy Preview for dashy-dev ready!

Name Link
🔨 Latest commit 6d2e37d
🔍 Latest deploy log https://app.netlify.com/sites/dashy-dev/deploys/628786efedd5df00099c2005
😎 Deploy Preview https://deploy-preview-663--dashy-dev.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@liss-bot liss-bot added the 🦋 Bug Fix [PR] Code includes bug fixes label May 19, 2022
@viezly
Copy link

viezly bot commented May 19, 2022

This pull request is split into 5 parts for easier review.
👀 Review pull request on Viezly

Changed files are located in these folders:

  • .github
  • /
  • docs
  • src

@Lissy93
Copy link
Owner Author

Lissy93 commented May 19, 2022

Remaining tasks:

@Lissy93
Copy link
Owner Author

Lissy93 commented May 19, 2022

If anyone has a couple minutes spare, would really appreciate a quick code review, before I merge
If it's your first time, click "Files Changed", have a quick read through, then click "Review Changes".
Thanks 🤗

@@ -89,7 +89,7 @@ const store = new Vuex.Store({
perms.allowSaveLocally = false;
}
// Disable saving changes to disk, only
if (appConfig.preventWriteToDisk || !isUserAdmin) {
if (appConfig.preventWriteToDisk || !isUserAdmin()) {
Copy link

@skornel02 skornel02 May 20, 2022

Choose a reason for hiding this comment

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

This will not fix issue #590 because if I understand correctly this is only a frontend check for admin privileges and therefore anyone can still realistically update the configuration file.
If you were visit the site as a guest, then proceed to add a "local" (not existing in conf.yml) user with admin role then continue to log in into that user then you can still very much update the config file however you like.
I'm suggesting a proper backend check for the already-known-good users/admins to permit unchecked file writes and command execution if there isn't one yet.

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yeah, you're right, there really should be more backend checks.

I have explained the attack in more detail in the Auth docs, as this authentication method definitely shouldn't be used outside of your local network. Keycloak is supported for more secure authentication. But it should also be possible to protect the app with any self-hosted auth provider.

Potentially the best option, is to remove simple-auth from the app all together, and let users bring their own auth provider.

Copy link

@skornel02 skornel02 May 20, 2022

Choose a reason for hiding this comment

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

I'm not really sure that removing the simple-auth would fix the issue, if there is no backend check. I mean it is nice that the password is handled by Keycloak for example, but if you don't need anything to activate a backend function, only the knowledge that where it is located and sending a direct request to it.
I for one say that the password hash being publicly accessible a non-issue, but in my case Dashy is running on a mini-pc and there it is a problem if anyone can start a rebuild of the software or they can fill the available storage with freely written configuration files.
Of course what you are saying that this should be used within a local network is totally reasonable, I just advocate that we place approriate warnings, that this should not be publically accessible because of possible "attack vectors".

Copy link

@skornel02 skornel02 left a comment

Choose a reason for hiding this comment

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

I think that either the lack of any real security should be addressed, or at the very least there should be a highly visible indication that there is in fact no "read-only access" for guests to prevent malicious access unbeknown to anyone running this project.
ps: I really love this project, keep the amazing work up!

@Lissy93 Lissy93 merged commit 78bed0f into master May 20, 2022
@Lissy93 Lissy93 deleted the FIX/user-suggestions-fixes-2.0.9 branch May 20, 2022 13:07
@liss-bot
Copy link
Collaborator

The fix for this issue has now been released in 2.0.9 ✨

If you haven't done so already, please update your instance to 2.0.9 or later. See 2.0.9 for full info.

Feel free to reach out if you need any more support. If you are enjoying Dashy, consider supporting the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants