Giter VIP home page Giter VIP logo

Comments (4)

rouault avatar rouault commented on June 5, 2024 1

Proposed fix in #7048

from mapserver.

geographika avatar geographika commented on June 5, 2024

@PPazderski - thanks for looking into this.
MSSQL uses both pwd and password for connections depending on the database driver used.

One option could be to replace both the password and the keyword which I think would solve the issue. For example:

\SQL2019;DATABASE=msautotest;pwd=Password12!;uid=sa;

Would become something like:

\SQL2019;DATABASE=msautotest;***************;uid=sa;

This would then skip any subsequent replacements. It could also stop at a linebreak if no delimiter is found, although if the above approach is used I'm not sure if that would still be necessary.

from mapserver.

geographika avatar geographika commented on June 5, 2024

Also it does look like mysql connections in OGR use a comma separator so that combination should also probably be included.

https://gdal.org/drivers/vector/mysql.html#layer-creation-options

from mapserver.

PPazderski avatar PPazderski commented on June 5, 2024

One option could be to replace both the password and the keyword which I think would solve the issue.

Unfortunately that would not work. Imagine the case with a space in password for MSSQL. With the current code plus replacing the password= it would first replace the password until the space in the password plus the key but then the second replacement for MSSQL with semicolon delimiter would not apply anymore. E.g.

\SQL2019;DATABASE=msautotest;password=Password with space;uid=sa;

would become

\SQL2019;DATABASE=msautotest;***************** with space;uid=sa;

and the second msRedactString not find any password= anymore. When changing the order the same would apply for a postgis password containing a semicolon.

from mapserver.

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.