• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 28583270853
86%

Build:
DEFAULT BRANCH: main
Ran 02 Jul 2026 10:30AM UTC
Jobs 8
Files 81
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Jul 2026 10:28AM UTC coverage: 85.916% (+0.09%) from 85.825%
28583270853

push

github

web-flow
fix(realtime): escape quotes and backslashes in `in` filter values (#1506)

## What

`PostgresChangeFilter.toString()` builds the `in` filter by quoting each
value, but never escapes the value first. A value containing a double
quote or backslash produces a malformed filter:

```dart
PostgresChangeFilter(
  type: PostgresChangeFilterType.inFilter,
  column: 'name',
  value: ['a"b'],
).toString();
// name=in.("a"b")  <-- the inner " breaks the quoted element
```

This escapes `\` and `"` inside each element before quoting, so the
value stays a single well-formed token.

## Why

The realtime `in` filter had the same missing-escaping bug that was
fixed for postgrest in #1481 (`_cleanFilterArray`), but the realtime
copy in `types.dart` was never updated:

```dart
return '$column=in.(${value.map((s) => '"$s"').join(',')})';
```

Any subscription filtering on a list whose values contain `"` or `\`
sends a broken filter to the Realtime server. The fix mirrors the
PostgREST/PostgreSQL array quoting used by `PostgrestFilterBuilder`:

```dart
final escaped = '$s'.replaceAll(r'\', r'\\').replaceAll('"', r'\"');
return '"$escaped"';
```

## Not a breaking change

Values without `"` or `\` render exactly as before
(`in.("active","pending")`), and non-`in` filters are untouched. Only
previously-malformed output changes.

## Tests

Added `packages/realtime_client/test/postgres_change_filter_test.dart`:
asserts `['a"b\c']` renders as `name=in.("a\"b\\c")`, that plain values
are unchanged, and that non-`in` filters are unaffected. The escaping
test fails on the old code (`Actual: name=in.("a"b\c")`) and passes with
the fix. `dart format` and `dart analyze --fatal-warnings` are clean.

---------

Co-authored-by: Lukas Klingsbo <lukas.klingsbo@gmail.com>

4 of 4 new or added lines in 1 file covered. (100.0%)

4203 of 4892 relevant lines covered (85.92%)

3.94 hits per line

Jobs
ID Job ID Ran Files Coverage
6 supabase - 28583270853.6 02 Jul 2026 10:30AM UTC 15
81.8
GitHub Action Run
7 supabase_flutter - 28583270853.7 02 Jul 2026 10:31AM UTC 11
79.26
GitHub Action Run
8 realtime_client - 28583270853.8 02 Jul 2026 10:32AM UTC 11
88.82
GitHub Action Run
7 functions_client - 28444889808.7 30 Jun 2026 12:39PM UTC 2
98.57
GitHub Action Run
8 storage_client - 28533236058.8 01 Jul 2026 04:46PM UTC 5
92.98
GitHub Action Run
8 gotrue - 28536394514.8 01 Jul 2026 05:43PM UTC 27
84.74
GitHub Action Run
5 postgrest - 28536394514.5 01 Jul 2026 05:43PM UTC 9
84.31
GitHub Action Run
3 yet_another_json_isolate - 28433368938.3 30 Jun 2026 09:12AM UTC 1
79.03
GitHub Action Run
Source Files on build 28583270853
  • Tree
  • List 81
  • Changed 5
  • Source Changed 4
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28583270853
  • 30349e22 on github
  • Prev Build on main (#28536394514)
  • Next Build on main (#28587363812)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc