Skip to content
This repository has been archived by the owner on Sep 8, 2021. It is now read-only.

db.view page accessible by any authenticated user #395

Closed
issuemover631 opened this issue May 11, 2017 · 1 comment
Closed

db.view page accessible by any authenticated user #395

issuemover631 opened this issue May 11, 2017 · 1 comment
Labels
type: enhancement-closed What was previously labeled enhancement. For archiving. Will be organized later.

Comments

@issuemover631
Copy link

Issue by pjoubert-
Thursday May 11, 2017 at 06:58 GMT
Originally opened as https://github.com/Libresonic/libresonic/issues/394


I found that the db.view page is accessible by any user. Then, a simple query, like "select * from user;" allows to dump user details: that's bad, but worst: #69 shows that passwords are simply encoded.
Access to this resource should be constrained to admins at least.
A workaround is to protect the page with the reverse proxy if using any.

@issuemover631
Copy link
Author

Comment by jooola
Thursday May 11, 2017 at 11:59 GMT


Oh damn!
That's bad...

Here is workaround for haproxy (simple HTTP Auth for the db.view URL ) :

defaults

  option http-server-close

  # HTTP Auth
  userlist $USERLISTNAME
  user $USER insecure-password $PASSWORD
backend libresonic_backend
  # HTTP Auth
  acl $SECUREURLNAME path_beg -i $SECUREURL # Here $SECUREURL should be /db.view
  acl $AUTHOK_SERVICE http_auth($USERLISTNAME)
  http-request auth realm libresonic if !$AUTHOK_SERVICE $SECUREURLNAME

Of course all $VARS have to be changed !

If think a HAproxy pro could do something a bit more secure but i'm not this guys... The above is really basic

@issuemover631 issuemover631 added type: enhancement-closed What was previously labeled enhancement. For archiving. Will be organized later. issue labels Jul 4, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: enhancement-closed What was previously labeled enhancement. For archiving. Will be organized later.
Projects
None yet
Development

No branches or pull requests

1 participant