Skip to content

fix(integrations): Validate integration_id in OrganizationIntegrationBaseEndpoint#114821

Merged
kcons merged 1 commit intomasterfrom
kcons/paramsafe
May 5, 2026
Merged

fix(integrations): Validate integration_id in OrganizationIntegrationBaseEndpoint#114821
kcons merged 1 commit intomasterfrom
kcons/paramsafe

Conversation

@kcons
Copy link
Copy Markdown
Member

@kcons kcons commented May 4, 2026

integration_id should look like a valid int before we treat it as one.

Fixes SENTRY-400N.

@kcons kcons requested review from a team as code owners May 4, 2026 23:39
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 4, 2026
args, kwargs = super().convert_args(request, organization_id_or_slug, *args, **kwargs)

if integration_id is not None:
kwargs["integration_id"] = to_valid_int_id(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is int here integration or integer? might be nice to either spell out integration or remove int (since all our ids minus a few places are integers)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

integer. This is a fancy replacement for the ad hoc int(whatever) calls we have/had sprinkled around.
There are 20+ uses, so probably not renaming in this PR, but it needs to move somewhere more general soon (this sprint would make sense) so we'll address that then.

@kcons kcons merged commit f17f2c7 into master May 5, 2026
62 checks passed
@kcons kcons deleted the kcons/paramsafe branch May 5, 2026 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants