codeant-ai-for-open-source[bot] commented on PR #35021:
URL: https://github.com/apache/superset/pull/35021#issuecomment-4012698724
## **Sequence Diagram**
Shows how alert/report email links are rewritten to a redirect endpoint when
messages are generated, and how the backend redirect view either forwards
internal links immediately or serves a frontend warning page that the user
confirms before navigating to external sites.
```mermaid
sequenceDiagram
participant EmailGenerator
participant LinkProcessor
participant Recipient (Browser)
participant Backend (RedirectView)
participant Frontend (RedirectWarning)
EmailGenerator->>LinkProcessor: process_html_links(description) ->
rewrite external hrefs to /redirect/?url=...
LinkProcessor-->>EmailGenerator: rewritten HTML
EmailGenerator-->>Recipient: send email with rewritten links
Recipient->>Backend: GET /redirect/?url=https://external.example/page
Backend->>Backend: validate URL, block dangerous schemes
alt internal host
Backend-->>Recipient: 302 redirect to internal URL
else external host
Backend-->>Recipient: 200 render RedirectWarning app
Recipient->>Frontend: load warning page (reads ?url)
alt URL trusted in localStorage
Frontend-->>Recipient: navigate directly to target URL
else
Frontend-->>Recipient: show confirmation UI; on Continue
optionally save trust and navigate to target
end
end
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]