misp-docker icon indicating copy to clipboard operation
misp-docker copied to clipboard

Core - Enhanced the validity check of Nginx's dhparam.pem file during configuration phase

Open Aldenar opened this issue 1 year ago • 3 comments

Whenever I tried running the misp-core image, it'd get stuck on an infinite loop of Nginx trying to start up, then failing due to invalid DHParam.pem file.

For unknown reasons, the file existed, but was empty every time.

This PR fixes that by enhancing the dhparam.pem file check, adding a contents check of the file, and if anything other than a valid DH Params are found, regenerates the file.

Aldenar avatar Jun 12 '24 20:06 Aldenar

This looks to me like a workaround to a runtime (and singular) issue. Not sure it would make sense to address it explicitly.

ostefano avatar Jun 19 '24 09:06 ostefano

On my server, I have tried resetting docker to a clean state several times, and always, the initial configuration got stuck on the dhparam file existing on disk, but being empty, thus leading to Nginx failing to start.

This commit does not alter the overall flow of the configuration, only adds a content verification step that, in my opinion, should have been present from the start.

I tried debugging why the file initially failed to generate, but that didn't lead to anything. This, however, worked fine. And finally allowed the container to start correctly.

Aldenar avatar Jun 19 '24 10:06 Aldenar

Mmm, did you try with the latest docker version available from docker.com?

ostefano avatar Jun 20 '24 08:06 ostefano