Fix codeQL error
---
- Call "tmpdir()" a single time inside "database.js" and remove "caFilePath" from the config if the path starts with the temporary directory path as a failsafe
- Fix whitespace
- Move the unassignment of " dbConfig.ssl" and " dbConfig.ssl" outside the block responsible to move the CA file from the temporary directory to the data directory
- Fix inverted "if" condition. Also add "path.resolve" to a path check in order to make sure that we are comparing absolute paths with each others
- Remove unnecessary check for a ".pem" file, simplify the path check and fix the file copying to itself
- Add additional path checks to avoid filename exploits
- Fix issue where the temp directory used to temporarily store the CA file is within the working directory instead of the OS provided temp directory path
------
Call "tmpdir()" a single time inside "database.js" and remove "caFilePath" from the config if the path starts with the temporary directory path as a failsafe
Fix whitespace
Move the unassignment of " dbConfig.ssl" and " dbConfig.ssl" outside the block responsible to move the CA file from the temporary directory to the data directory
Fix inverted "if" condition. Also add "path.resolve" to a path check in order to make sure that we are comparing absolute paths with each others
Remove unnecessary check for a ".pem" file, simplify the path check and fix the file copying to itself
Add additional path checks to avoid filename exploits
Fix issue where the temp directory used to temporarily store the CA file is within the working directory instead of the OS provided temp directory path
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Lithuanian)
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Lithuanian)
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Lithuanian)
Currently translated at 89.5% (957 of 1069 strings)
Translated using Weblate (Lithuanian)
Currently translated at 88.4% (945 of 1069 strings)
Co-authored-by: mantak <mantaksam@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/lt/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Croatian)
Currently translated at 100.0% (1061 of 1061 strings)
Co-authored-by: Ivan Bratović <ivanbratovic4@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/hr/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1067 of 1067 strings)
Translated using Weblate (Ukrainian)
Currently translated at 100.0% (1061 of 1061 strings)
Co-authored-by: stanol <stanol777@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/uk/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1067 of 1067 strings)
Translated using Weblate (French)
Currently translated at 100.0% (1061 of 1061 strings)
Co-authored-by: Cyril59310 <archas.cyril@hotmail.fr>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/fr/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (German (Switzerland))
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (German)
Currently translated at 100.0% (1067 of 1067 strings)
Translated using Weblate (German (Switzerland))
Currently translated at 100.0% (1067 of 1067 strings)
Translated using Weblate (German)
Currently translated at 100.0% (1061 of 1061 strings)
Translated using Weblate (German (Switzerland))
Currently translated at 100.0% (1061 of 1061 strings)
Co-authored-by: Marco <marco@nanoweb.ch>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de/
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/de_CH/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1069 of 1069 strings)
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1067 of 1067 strings)
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1061 of 1061 strings)
Translated using Weblate (Bulgarian)
Currently translated at 100.0% (1055 of 1055 strings)
Co-authored-by: MrEddX <mreddx@chatrix.one>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/bg/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1053 of 1053 strings)
Translated using Weblate (Romanian)
Currently translated at 97.2% (1024 of 1053 strings)
Co-authored-by: Black <cristian.badea@yahoo.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/ro/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 100.0% (1053 of 1053 strings)
Translated using Weblate (Hungarian)
Currently translated at 100.0% (1053 of 1053 strings)
Co-authored-by: Alex Nagy <nagyalex003@gmail.com>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/hu/
Translation: Uptime Kuma/Uptime Kuma
Currently translated at 54.5% (574 of 1053 strings)
Translated using Weblate (Norwegian Bokmål)
Currently translated at 50.8% (535 of 1053 strings)
Co-authored-by: csjoh <github@csj.no>
Translate-URL: https://weblate.kuma.pet/projects/uptime-kuma/uptime-kuma/nb_NO/
Translation: Uptime Kuma/Uptime Kuma