Skip to content

Conversation

@dygland
Copy link
Contributor

@dygland dygland commented Apr 25, 2025

NOTE: I have not yet tested this due to lack of proper environment, will try to do so ASAP if you cant.

Removed the single qoutes around {{ flag }} => {{ value }} since the config does not work with them in place. According to https://github.com/MISP/MISP/blob/2.5/app/Config/database.default.php the database flags should be without quoutes.

Note that MISP2.5 requres the flag
'flags' => [
PDO::ATTR_STRINGIFY_FETCHES => true
]

to have the API work as expected so this might be hardcoded in? I dont know if 2.4 compability is still needed.

Removed the single qoutes around  {{ flag }} => {{ value }} since the config does not work with them in place. According to https://github.com/MISP/MISP/blob/2.5/app/Config/database.default.php the database flags should be without quoutes.

Note that MISP2.5 requres the flag 
        'flags' => [
            PDO::ATTR_STRINGIFY_FETCHES => true
        ]

to have the API work as expected so this might be hardcoded in? I dont know if 2.4 compability is still needed.
@dygland
Copy link
Contributor Author

dygland commented Apr 25, 2025

This has now been tested, works as intended. Ie the results from api requests are stringified if you supply that flag per misp project instructions

@dygland
Copy link
Contributor Author

dygland commented May 13, 2025

Could this be merged @ondj ? :) or do you need something else?

@ondj
Copy link
Contributor

ondj commented Jun 16, 2025

@dygland I am not sure if this is good idea. Now I am thinking to remove MYSQL_FLAGS variable completely and just set correct value. I didn't know that there was change in MISP between 2.4 and 2.5.

@dygland
Copy link
Contributor Author

dygland commented Jun 16, 2025

@ondj this would ofc solve this issue, but I guess that the mechanism to supply flags for MySQL is there for a reason? Also existing installs that utilizes the flags might get broken if its removed?

Although since they wont work within quotes I guess noone is using them so the option might just as well be removed.

We have used it without the quotes for quite some time now without any issues.

@Benni0
Copy link
Contributor

Benni0 commented Jun 23, 2025

I've implemented this config option alongside with MYSQL_SETTINGS, but haven't used it - so the MYSQL_FLAGS option might not be necessary and can be removed from my POV. I needed the MYSQL_SETTINGS option, because one of my MISP instances were using a MariaDB database where autocommit was disabled. MISP/MISP#10106

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants