SIGN IN SIGN UP

account_service: fix swapped args in PropertyValueNotInList errors

Three call sites in account_service.hpp passed the property name as
arg1 (value slot) and the rejected value as arg2 (property slot) to
messages::propertyValueNotInList(res, value, property). The arg2
position is what error_messages.cpp uses to build the OData
annotation key and the second %N substitution, so the swap produced
a malformed JSON key and inverted message text on every hit.

For a PATCH like:
  {"MultiFactorAuth":{"ClientCertificate":
   {"CertificateMappingAttribute":"Garbage"}}}

bmcweb emitted:
  "Garbage@Message.ExtendedInfo": [{
    "Message": "The value 'CertificateMappingAttribute' for the
               property Garbage is not in the list ...",
    "MessageArgs": ["\"CertificateMappingAttribute\"", "Garbage"], ...
  }]

After this fix:
  "CertificateMappingAttribute@Message.ExtendedInfo": [{
    "Message": "The value 'Garbage' for the property
               CertificateMappingAttribute is not in the list ...",
    "MessageArgs": ["Garbage", "CertificateMappingAttribute"], ...
  }]

The same swap pattern existed for AccountTypes and HttpBasicAuth on
the AccountService PATCH path; both are corrected here since the
fix is identical and the malformation makes the annotation
unaddressable for programmatic Redfish clients keying off the
property name.

Tested:
  curl -sk -u root:$BMC_PASS -H "Content-Type: application/json" \
       -X PATCH -d '{"MultiFactorAuth":{"ClientCertificate":
       {"CertificateMappingAttribute":"Garbage"}}}' \
       https://$BMC_IP/redfish/v1/AccountService
  -> @Message.ExtendedInfo key now prefixed with the property name;
     MessageArgs ordered [value, property].

Change-Id: Iee9cb6defea0d4a0ebc5e776bee8d91b02188973
Signed-off-by: Chandramohan Harkude <chandramohan.harkude@gmail.com>
C
Chandramohan Harkude committed
a7f0d0a7b1180f8027adbeffd8ae7d0eadbf91c6
Parent: 3b9e3d1
Committed by Ed Tanous <ed@tanous.net> on 6/25/2026, 3:22:29 PM