Skip to content

[18.0] [FIX] server_environment: no interpolation in the configparser#266

Open
AxelPrel wants to merge 1 commit into
OCA:18.0from
xcgd:bugfix/18.0/server_environment/interpolation
Open

[18.0] [FIX] server_environment: no interpolation in the configparser#266
AxelPrel wants to merge 1 commit into
OCA:18.0from
xcgd:bugfix/18.0/server_environment/interpolation

Conversation

@AxelPrel
Copy link
Copy Markdown

Fixes #265

@OCA-git-bot OCA-git-bot added series:18.0 mod:server_environment Module server_environment labels May 20, 2026
@AxelPrel AxelPrel force-pushed the bugfix/18.0/server_environment/interpolation branch from c354f67 to dc80c52 Compare May 20, 2026 09:39
@AxelPrel AxelPrel force-pushed the bugfix/18.0/server_environment/interpolation branch from dc80c52 to 82973d6 Compare May 20, 2026 11:52
sbidoul
sbidoul previously approved these changes May 20, 2026
@sbidoul sbidoul dismissed their stale review May 21, 2026 05:54

Hm, but this is a breaking change? What happens for users who have aready escaped % characeters in their configs.

@AxelPrel
Copy link
Copy Markdown
Author

yes this is a breaking change. any user of the module that explicitely use the configparser with interpolation (ie %(my_variable)) will get no interpolation at all.
If the use of the parser is to be kept, then it must be documented in the module that this feature exists.
And I have to find another way to bypass this problem (maybe by a configuration key in the conf that tells the module what config to give the configparser, with or without interpolation)
If the use of the parser is just something that was forgotten when the module was made, then the change I proposed is to be kept. Your call

@AxelPrel
Copy link
Copy Markdown
Author

AxelPrel commented May 21, 2026

oh, and any user that doubled their %, bypassing this problem, will also suffer from this change, since the escape will now be taken literally, they will see two %% instead of just one % before, i think this is what you meant

the escaping solution was not approved where we use this module, since we are talking about secrets that will eventually be placed directly in the conf by an external tool (apikeys, passwords, etc) and escaping the % at this stage, even though it fixed the problem, was considered a dirty workaround that was not approved. this is why i proposed this change

@sbidoul
Copy link
Copy Markdown
Member

sbidoul commented May 21, 2026

oh, and any user that doubled their %, bypassing this problem, will also suffer from this change, since the escape will now be taken literally, they will see two %% instead of just one % before, i think this is what you meant

Yes exactly that, I've been hit by that this week too...

But breaking that behaviour will make things awful for those who already escaped.

So let's make this configurable with a system parameter and some documentation?

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

Labels

mod:server_environment Module server_environment series:18.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[18.0] server_environment: crash when a value contains a %

3 participants