OWASP / OWASP/Nest

Member search shows "Search service error" for special-character-only queries

Open
#4,979 3 comments 0 reactions 2 assignees Claimed by @Tanishq-mellu View on GitHub
bug
Dominant language
Python
Stars
451
Forks
707
Avg merge
22h 59m
Merged PRs (30d)
91

Description

## Describe the bug

The member search page returns a visible "Search service error" notification when the search query consists only of special characters.

## Steps to reproduce

1. Navigate to `/members`
2. Enter one of the following queries:

```
@
@@@
#
%
@@@ ### %%%%
% & * + ? / \ " ' ( ) [ ] =
```

3. Observe the search results and notifications.

## Actual behavior

A red notification appears:

```
Server Error
Search service error
```

The search request triggers a visible "Search service error" notification while the displayed member results remain unchanged. The user receives a server error message instead of a graceful empty-state or validation response.

## Expected behavior

Special-character-only queries should be handled gracefully.

Possible approaches:

* Return "No Users found"
* Ignore unsupported characters
* Validate/sanitize input before sending the search request
* Display a user-friendly validation message

The UI should not expose a backend search-service error for user input.

## Additional context

Regular text queries such as:

```
aaaaaaaaaaaaaaaaaaaaaaaa
```

correctly return:

```
No Users found
```

which suggests the issue is specific to handling special-character-only queries.

## Screenshots

Image
Image

### Tested queries

Produces "Search service error":

- @
- @@@
- #
- %
- @@@ ### %%%%
- % & * + ? / \ " ' ( ) [ ] =

Produces expected behavior:

- aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- Returns "No Users found"

## Environment

- Browser: Google Chrome
- Platform: Windows
- Page: /members

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.