Improve audit logging, error handling, and metadata encoding
- Ensure all email/SMS send attempts are audit-logged, including API errors, exceptions, invalid addresses, and disabled service cases; logs now include raw API responses or exception details for better diagnostics. - Fix audit log parameter builder to never pass NULL for NOT NULL columns (`config`, `DateSent`). - Add unit tests covering all send paths and audit log correctness. - Percent-encode non-ASCII/control chars in `DocumentMetadataBuilder` for safe HTTP header metadata; add tests. - Simplify admin test mail dialog JS and improve success handler robustness. - Set `charset=utf-8` in admin controller JSON responses for OCORE consistency. - Update minified JS to match new admin dialog logic.
This commit is contained in:
@@ -85,8 +85,10 @@ public partial class IntranetController
|
||||
ContractResolver = new CamelCasePropertyNamesContractResolver(),
|
||||
};
|
||||
|
||||
// Mirror OCORE's getJSONResult exactly (application/json; charset=utf-8) so the response
|
||||
// parses identically to every other endpoint the frontend's postXT talks to.
|
||||
private ContentResult AdminJson(object payload) =>
|
||||
Content(JsonConvert.SerializeObject(payload, CamelCaseJson), "application/json");
|
||||
Content(JsonConvert.SerializeObject(payload, CamelCaseJson), "application/json; charset=utf-8");
|
||||
|
||||
/// <summary>
|
||||
/// Resolves the calling user's <c>fds_sys</c> module authorization level via the
|
||||
|
||||
Reference in New Issue
Block a user