Skip to content

KQL search can't escape quotes, a trailing backslash causes a 500 #3666

Closed

Description

@AlexAndBear

Describe the bug

KQL search has no working way to escape " (or a trailing \) inside a quoted value. Clients that build queries from user input (e.g. the web search bar) can't search for terms that contain quotes, and a trailing backslash crashes the request.

Steps to reproduce

  1. Upload a file named Angebot "Quote" Test.txt with the content Der Kunde sagte "Quotewort" im Gespraech.
  2. Send a WebDAV REPORT search to /remote.php/dav/spaces/ with these patterns:
    • name:"*\"Quote\"*"
    • content:"\"Quotewort\""
    • content:"foo\"

Expected behavior

\" is treated as an escaped quote and the file is found. Invalid queries return a 400.

Actual behavior

  • name:"*\"Quote\"*" → 207, no results
  • content:"\"Quotewort\"" → 500
  • content:"foo\" → 500

Without quotes (name:"*Quote*", content:"Quotewort") the file is found.

Setup

OpenCloud 8.0.1 (rolling), docker-compose.yml from opencloud-eu/web, full text search with Tika (SEARCH_EXTRACTOR_TYPE=tika).

Additional context

Found while working on the web search (opencloud-eu/web#3558).

Activity

  1. moved this from Qualification to Prio 2 in OpenCloud Team Boardon Oct 28, 2026
  2. self-assigned this
    on Oct 28, 2026
  3. aduffeck commented on Oct 28, 2026

    @aduffeck
    Member

    I'd suggest using "" to escape quotes which is what the KQL spec defines.

    @AlexAndBear does that work for you, too?

  4. AlexAndBear commented on Oct 28, 2026

    @AlexAndBear
    MemberAuthor

    I'd suggest using "" to escape quotes which is what the KQL spec defines.

    @AlexAndBear does that work for you, too?

    Sure, let's follow the official specs 👏

  5. added a commit that references this issue on Nov 2, 2026
    fef2b7e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions