]> source.dussan.org Git - gitblit.git/commit
fix: Fix StoredUserConfig handling null subsections
authorFlorian Zschocke <f.zschocke+git@gmail.com>
Sun, 13 Mar 2022 16:48:19 +0000 (17:48 +0100)
committerFlorian Zschocke <f.zschocke+git@gmail.com>
Sun, 13 Mar 2022 16:48:19 +0000 (17:48 +0100)
commit16ec6d07c58356d9b20652b5ae168ae9f0fd2eaa
tree8be4fd0c5234f12a4949f47d0e3a8f17bc227508
parent1c4fbc07c2f1898bf24e1d0076f01faa0c824b84
fix: Fix StoredUserConfig handling null subsections

Te `StoredUserConfig` did not handle sections without a subsection.
When the subsection did not exist, i.e. was `null`, then the subsection
name would be set to the string "null". This is not how the config file
format works. It should create a `[SECTIONNAME]` entry instead.

This fix handles a `null` subsection correctly, by handling it as a
section without a subsection.
src/main/java/com/gitblit/StoredUserConfig.java
src/test/java/com/gitblit/StoredUserConfigTest.java [new file with mode: 0644]