Repository navigation
Fixed an issue where security labels spanning several lines broke the Properties dialog. #10817 - #10821
Conversation
… Properties dialog. pgadmin-org#10817 parse_sec_labels_from_db(), used for databases, domains, functions and foreign tables, matched each 'provider=label' string with a regular expression that stopped at the first newline, so a multi-line label raised an error, was split at the wrong '=', or lost a trailing newline. It now uses parse_seclabels_from_db(), which splits on the first '=' only, so every node parses security labels the same way. Closes pgadmin-org#10817
|
No actionable comments were generated in the recent review. WalkthroughThe database security-label utility now uses the shared parser. Tests cover multiline labels, embedded equals signs, trailing newlines, and ChangesDatabase security-label parsing
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Possibly related PRs
Merge Risk:
|
|
Thanks for the fix. I read the change: replacing the regex with the shared split('=', 1) parser from #10808 looks right to me, and the new tests cover multi-line labels, a later '=' and a trailing newline. |
Summary
parse_sec_labels_from_db()(databases, domains, functions, foreign tables) parsed labels with a regex that stopped at the first newline, so a multi-line label errored on load, split at the wrong=, or lost a trailing newline.parse_seclabels_from_db()from fix: split security labels on the first = only #10808, which splits on the first=only, so every node parses security labels the same way.Test plan
test_parse_seclabels_from_dbwith multi-line cases and the wrapper; the wrapper case fails without the fix.--pkg browser.server_groups.servers.databases.schemas.domainspasses.Closes #10817
Summary by CodeRabbit