DivineOmega / password_exposed

🔒 Password Exposed Helper Function - Check if a password has been exposed in a data breach.
GNU Lesser General Public License v3.0
213 stars 34 forks source link

ca-certs.json not found in data directory. #20

Closed siva2507 closed 5 years ago

siva2507 commented 5 years ago

Hi ,

This is my issue on password store /update,

Issue: "ParagonIE \ Certainty \ Exception \ FilesystemException ca-certs.json not found in data directory"

And i added screen shot.Please kindly give me a solution https://user-images.githubusercontent.com/45994584/50214954-a68a1600-03a7-11e9-914b-71d0966e6b55.png

DivineOmega commented 5 years ago

This is not an issue I've experience myself.

@paragonie-scott @paragonie-security Would you be able to weigh in on this issue?

siva2507 commented 5 years ago

No dude. The problem is on "paragonie". I have the file 'ca-certs.json ' in vendor/paragonie/certainty/data. But this json file not accessing while store/update password . That's my problem.

paragonie-scott commented 5 years ago

https://user-images.githubusercontent.com/45994584/50214954-a68a1600-03a7-11e9-914b-71d0966e6b55.png

password_exposed is not using the vendor/paragonie/certainty/data directory.

https://github.com/DivineOmega/password_exposed/blob/6050ee1e718bafd1285845e2ef3fe924d767d783/src/PasswordExposedChecker.php#L55

Please kindly give me a solution

This could be a filesystem permissions issue. Try running chmod +w vendor/DivineOmega/password_exposed/bundles.

Adding a Composer hook to force that directory to be writable (and maybe fetching the first set of certs on first run) would ensure the file exists.

DivineOmega commented 5 years ago

@siva2507 Did @paragonie-scott's suggestion resolve your issue?

DivineOmega commented 5 years ago

Closing due to inactivity.

SimZal commented 5 years ago

I had the same issue. AFAIK the files inside /vendor should not be writable by web user, so this error will impact many developers. mPDF solved it the way Scott is proposing, by adding

    "scripts": {
        "post-install-cmd": [
            "php -r \"chmod('./tmp', 0777);\""
        ]
    },

This will not help in all cases, mPdf says setting custom temporary directory is possible and recommended.