Flagsmith/flagsmith

Null-terminated query parameters cause server errors in the Core SDK endpoints

オープン

#2,901 opened on 2023/10/30

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)Python (264 件のフォーク)batch import
buggood first issue

Repository metrics

Stars
 (3,475 個のスター)
PR merge metrics
 (平均マージ 3d 7h) (30d で 157 merged PRs)

説明

Example Sentry issue: FLAGSMITH-API-3TZ

ValueError: A string literal cannot contain NUL (0x00) characters.
(15 additional frame(s) were not displayed)
...
  File "environments/identities/views.py", line 185, in get
    .get_or_create(identifier=identifier, environment=request.environment)

This should be a problem for every view that accesses query parameters directly.

A quick search yields 8 occurences of this: https://github.com/search?q=repo%3AFlagsmith%2Fflagsmith+query_params.get&type=code

For each of those we need to assess the performance impact of using a serializer (DRF's CharField handles null chars).

コントリビューターガイド