Copy auth field objects when serializing values
What does this MR do and why?
This fixes a bug where a computed property would inadvertently reset a form field.
When editing a DAST site profile that had a password set, the password field is set to a redacted value ('••••••••') as is the requestHeaders field. This is done for security reasons and means that, when saving the profile without changing the password field, its value should be omitted from the request payload so that its original value is preserved in the DB. This is being controlled by the serializedAuthFields computed property that deletes the password property from the object. The issue is that the password property was being accessed by reference in serializedAuthFields, which resulted in the main form object being mutated, hence resetting the password field's value.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
- Create a DAST Site profile with authentication enabled and a password set.
- Edit the profile.
- The
passwordfield should be populated with'••••••••'.
- The
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #348550 (closed)

