pulaksaha143 opened a new pull request, #71684: URL: https://github.com/apache/airflow/pull/71684
Fixes #68382 **Description** Airflow previously accepted invalid connection port numbers (-1, 999999) without validation. This PR adds strict validation (0-65535) at three critical layers to ensure bad data is never accepted or persisted: 1. Core `Connection` model via SQLAlchemy `@validates` 2. Task SDK `Connection` via `__init__` 3. REST API `ConnectionBody` via Pydantic `Field(ge=0, le=65535)` **Testing** Added parameterized pytest coverage for: * SQLAlchemy `Connection` model boundary rejections. * Task SDK `Connection` initialization and payload parsing. * FastAPI public REST API (`/connections`) `POST` and `PATCH` returning `422 Unprocessable Entity` for out-of-bounds ports. -- 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]
