cron parsing issue · Issue #45186 · supabase/supabase · GitHub
Skip to content

cron parsing issue #45186

@vickyprus100

Description

@vickyprus100
  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

Creating or editing a Cron HTTP job in Supabase Studio handles SQL-escaped apostrophes incorrectly.

If the job body or headers contain a single quote ('), for example can''t in the stored SQL value, the Create/Edit Job flow shows or stores corrupted values instead of the original semantic value. It also collapses meaningful double spaces inside the JSON body.

To Reproduce

  1. Open the SQL Editor.
  2. Run:
create extension if not exists pg_cron;
create extension if not exists pg_net;

select cron.schedule(
  'ui_repro_http_literal_parse',
  '0 0 1 1 *',
  $$
  select net.http_post(
    url:='https://example.com/api/endpoint',
    headers:='{"X-Text":"can''t"}'::jsonb,
    body:='{"message":"hello  there","text":"can''t"}'::jsonb,
    timeout_milliseconds:=5000
  );
  $$
);
  1. Go to Integrations -> Cron -> Jobs.
  2. Find ui_repro_http_literal_parse.
  3. Open the row menu and click Edit job.
  4. Check the parsed HTTP Request Body and header values.

Expected behavior

The edit form should show the original semantic values:

  • Header value: can't
  • Body value: {"message":"hello there","text":"can't"}

Screenshots

If needed, I can provide screenshots of the Edit Job form showing the corrupted parsed values

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingfrontendRelated to supabase dashboardintegrationsIssues related to our integrationspr-openedA PR has been opened to resolve the issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions