|
6 | 6 | namespace UmbracoWeb.Services; |
7 | 7 |
|
8 | 8 | /// <summary> |
9 | | -/// Service for integrating with PhishLabs incident reporting API |
| 9 | +/// Service for integrating with PhishLabs Case Creation API |
10 | 10 | /// </summary> |
11 | 11 | public class PhishLabsService : IPhishLabsService |
12 | 12 | { |
@@ -52,20 +52,23 @@ public async Task<PhishLabsIncidentResponse> SubmitIncidentAsync( |
52 | 52 |
|
53 | 53 | try |
54 | 54 | { |
| 55 | + var sanitizedUrl = SanitizeUrl(request.Url); |
55 | 56 | var apiRequest = new PhishLabsApiRequest |
56 | 57 | { |
57 | | - Url = SanitizeUrl(request.Url), |
58 | | - Description = SanitizeDescription(request.Details), |
59 | | - Source = "umbraco-web", |
60 | | - Timestamp = DateTime.UtcNow |
| 58 | + CaseType = "Phishing", |
| 59 | + Title = $"Suspicious URL: {sanitizedUrl}", |
| 60 | + Description = string.IsNullOrWhiteSpace(request.Details) |
| 61 | + ? $"Reported URL: {sanitizedUrl}" |
| 62 | + : $"Reported URL: {sanitizedUrl}\n\nDetails: {SanitizeDescription(request.Details)}", |
| 63 | + Source = "umbraco-web" |
61 | 64 | }; |
62 | 65 |
|
63 | 66 | var response = await SubmitToPhishLabsAsync(apiRequest, correlationId, cancellationToken); |
64 | 67 |
|
65 | 68 | if (response.Success) |
66 | 69 | { |
67 | | - _logger.LogInformation("PhishLabs incident submitted successfully. CorrelationId: {CorrelationId}, IncidentId: {IncidentId}", |
68 | | - correlationId, response.IncidentId); |
| 70 | + _logger.LogInformation("PhishLabs case created successfully. CorrelationId: {CorrelationId}, CaseId: {CaseId}", |
| 71 | + correlationId, response.CaseId); |
69 | 72 |
|
70 | 73 | return new PhishLabsIncidentResponse |
71 | 74 | { |
|
0 commit comments