API endpoint filter slug with one character throwing error #8433
Labels
affects:api
Affects the Ghost API
bug
[triage] something behaving unexpectedly
help wanted
[triage] Ideal issues for contributors to help with
server / core
Issues relating to the server or core of Ghost
Welcome to Ghost's GitHub repo! 👋🎉
Do you need help or have a question? Please come chat in Slack: https://ghost.org/slack 👫. Got an idea for a new feature? Please add it to our wishlist: http://ideas.ghost.org 🌟. Found a bug? Please fill out the sections below... thank you 👍
Issue Summary
When accessing the API endpoint for getting posts with a filter query of a slug with just one character it throws the following error:
ERROR: Query Error: unrecognized text "v" in filter at char 6
slug:v
I know you wouldn't generally want to use a 1 character slug and it's really stupid etc. but the editors of the blog I develop for apparently screwed up a couple of years ago I just realized. Even though 1 character slugs are stupid, I'm assuming this is not intended behaviour, yeah?
Steps to Reproduce
You can for example use these query params for your call: filter=slug:a&fields=slug,html,image,meta_description,title&limit=1
Technical details:
The text was updated successfully, but these errors were encountered: