Conversation
|
@PTR-inc any comments to this PR? |
|
The visible username/password dumpstring was removed after discussion #7221 and PR #7225. Then the next question would be: is it still necessary to mask the username/password if you are intentionally debugging the db connection? If so, I would suggest to use a regex with the known password/username args (parent.args.postgres) to mask them. A lot safer should things change with the pgdump tool arguments and easier to read. Also, where to output, the errorlog and/or the webui? |
May I ask why this was removed? Due to it exposing the username+password? If so then we should definitely put it behind some safeguards. The debugging of password/username could be useful is things are not parsing well. But in that case I think people can manually add a console.log? I think its safest to mask it. Put the errors in mesherrors.txt? Or where do you suggest? |
Yes, if the backupcheck errored, it put the error unredacted to the webui, so in the case of postgres with user/pw.
It can go to console.error for example. That way you can redirect it however you want through your server config. |
|
I out-commented the func and just put a console.error for Maria, Mongo and Postgre. Maybe not the most beautiful way, but at least the error can be seen in the server console. |
I think the whole resistance was due to the printing of the values to the front-end. So that would fix this I think. |
|
Maybe a bit overcautious, but maybe never log sensitive data unless specifically enabled with debug options? |
|
I can change it by PostgreSQL to: or I can change it for maria and postgre like that: of course, in the config replace postgres with mariaDB |
|
Sorry for the late reply, hectic times over here, a few suggestions:
All this is because of the db backup being done with the different external tools (also see all the issues with not finding the dump tool because of path/install/version differences). This could all be much safer if the reliance on those tools could be removed. I have looked for options/solutions (not exhaustive, and a year ago), but found none without needing extensive rewriting. |
|
@PTR-inc thanks for the explanation. I just had an issue with AppLocker and encodeURIComponent. Adobe used quotation marks in their certificate name which breaks the event log with %22 |
|
Yeah, special characters/diacritic marks are always a nice testcase. And after that non-english OSes :-) Looks good, only question I have at the moment is regarding the |
|
you are absolutely right, not sure if just moving the encoding part outside is enough: |
Not a real PR, but the error variable is never used and when you use maybe an incorrect PostgreSQL version, as I do/did, you miss the real error about it. Alternative just a console.log would be sufficient.
I also put a RegEx to remove the password from the output