Skip to content

Conversation

@jscheffl
Copy link
Contributor

@jscheffl jscheffl commented Nov 5, 2023

With AIP-50 we introduced trigger forms and such trigger forms allow to provide raw HTML by DAG authors as descriptions.

During Airflow Summit there were some concerns discussed whether a DAG author would be able to inject dangerous JavaScript into the HTML and how Airflow handles this.

This PR changes the raw HTML support in Airflow in the way:

  • A new configuration option allow_html_in_dag_docs is added, which defaults to False
  • DAG documentation and Params Descriptions allow raw HTML only based on the server config option
  • As alternative for safe but still custom text formatting MD is now supported for parameter descriptions
  • Markdown also in DAG description is now filtering HTML tags by default
  • The custom_html_form in trigger DAG UI is marked as deprecated for a future / better solution
  • Example DAGs have been adjusted from raw HTML to MD descriptions where used.

@boring-cyborg boring-cyborg bot added area:webserver Webserver related Issues kind:documentation labels Nov 5, 2023
Copy link
Member

@potiuk potiuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Few nits only.

@potiuk
Copy link
Member

potiuk commented Nov 12, 2023

Looks like all checks passed :)

@potiuk
Copy link
Member

potiuk commented Nov 12, 2023

I think the only thing we need is .significant change description for relese notes.

@jscheffl
Copy link
Contributor Author

I think the only thing we need is .significant change description for relese notes.

@potiuk how about the one already in? --> https://github.com/apache/airflow/pull/35460/files#diff-1fa4ad17cb7d1ce8e7e5c724a04fceaac361d7cc44f4c27143359083cb4bb700

@potiuk
Copy link
Member

potiuk commented Nov 12, 2023

I think the only thing we need is .significant change description for relese notes.

@potiuk how about the one already in? --> https://github.com/apache/airflow/pull/35460/files#diff-1fa4ad17cb7d1ce8e7e5c724a04fceaac361d7cc44f4c27143359083cb4bb700

Good enough :)

@jscheffl jscheffl marked this pull request as ready for review November 12, 2023 18:39
@jscheffl jscheffl merged commit 0b99560 into apache:main Nov 12, 2023
@ephraimbuddy ephraimbuddy added the type:improvement Changelog: Improvements label Nov 20, 2023
@ephraimbuddy ephraimbuddy added this to the Airflow 2.8.0 milestone Nov 20, 2023
@jle-pass
Copy link

jle-pass commented Apr 17, 2024

mentioned by CVE-2023-47265
but we don't see it as a CVE in https://github.com/apache/airflow/releases/tag/2.8.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:webserver Webserver related Issues kind:documentation type:improvement Changelog: Improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants