Closed TihomirStoyanov closed 1 year ago
Redmine server version: 4.2.8.stable Issue exists with redmine-net-api 4.30 and 4.6.0 Serialization type: xml
Enable two-factor authentication for some user, then try to get users from redmine. The xml for the user looks like:
<user> <id>13</id> <login>test.test</login> <admin>false</admin> <firstname>Test</firstname> <lastname>Test</lastname> <mail>test.test@company.com</mail> <created_on>2022-11-29T08:45:03Z</created_on> <updated_on>2023-02-09T17:34:35Z</updated_on> <last_login_on>2023-05-17T10:29:31Z</last_login_on> <passwd_changed_on/> <twofa_scheme>totp</twofa_scheme> <custom_fields type="array"> <custom_field id="11" name="Custom Field 1"> <value>Yes</value> </custom_field> <custom_field id="12" name="Custom Field 2"> <value/> </custom_field> <custom_field id="13" name="Custom Field 3"> <value>No</value> </custom_field> <custom_field id="14" name="Custom Field 4"> <value/> </custom_field> </custom_fields> </user>
when two-factor authentication is disabled the element is: <twofa_scheme/>
<twofa_scheme/>
Here is the exception from the code:
Suggested change in: https://github.com/zapadi/redmine-net-api/blob/master/src/redmine-net-api/Types/User.cs#L190
change reader.ReadContentAsString() to reader.ReadElementContentAsString()
reader.ReadContentAsString()
reader.ReadElementContentAsString()
Thanks
Redmine server version: 4.2.8.stable Issue exists with redmine-net-api 4.30 and 4.6.0 Serialization type: xml
Enable two-factor authentication for some user, then try to get users from redmine. The xml for the user looks like:
when two-factor authentication is disabled the element is:
<twofa_scheme/>
Here is the exception from the code:
Suggested change in: https://github.com/zapadi/redmine-net-api/blob/master/src/redmine-net-api/Types/User.cs#L190
change
reader.ReadContentAsString()
toreader.ReadElementContentAsString()