Code Monkey home page Code Monkey logo

Comments (4)

colinskow avatar colinskow commented on August 17, 2024

The getDBURL API injects the session token and a randomly generated password into the database URL. The user's login information is not sent. When the session is closed this will no longer work. Regardless, any production system that is not behind SSL is insecure.

from superlogin.

SukantGujar avatar SukantGujar commented on August 17, 2024

Thanks for your response Colin. I looked into the code for getDBUrl and it seems to simply append URI encoded dbServer.user and dbServer.password from the configuration settings. Could you please point me to the code where it generates and uses random password for getDBUrl?
Here's what it looks to me ->
In dbAuth/index.js/this.authorizeUserSessions -
var db = new PouchDB(util.getDBURL(config.getItem('dbServer')) + '/' + personalDB);
And then in util.getDBURL -
url = db.protocol + encodeURIComponent(db.user) + ':' + encodeURIComponent(db.password) + '@' + db.host;
Am I looking at the wrong method?

from superlogin.

colinskow avatar colinskow commented on August 17, 2024

See here for the code that generates this. Username and password are a URL Safe UUID.

from superlogin.

SukantGujar avatar SukantGujar commented on August 17, 2024

Thanks Colin, I am closing this issue.

from superlogin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.