Skip to content

fix: adds validation on auto complete request payload - #3924

Open
thoniTUB wants to merge 5 commits into
developfrom
fix/limit-autocomplete-input
Open

fix: adds validation on auto complete request payload#3924
thoniTUB wants to merge 5 commits into
developfrom
fix/limit-autocomplete-input

Conversation

@thoniTUB

@thoniTUB thoniTUB commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator
  • Backend denies terms longer than 500 chars with an validation error
  • Frontend input-field only allows 500 chars for inputs that trigger (auto-complete)-requests, after that, typing simply stops without any futher visual indication (default behaviour of )
  • auto-complete requests to solr now use POST instead of GET, putting the payload from the query-string in to the body -> now more URI too long

import { filterSuggestionToSelectOption } from "./suggestionsHelper";

const PAGE_SIZE = 25;
const MAX_AUTOCOMPLETE_TEXT_LENGTH = 500;

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@awildturtok ich reiche den Wert nicht vom Backend durch, damit jetzt nicht noch die API angepasst werden muss

@thoniTUB
thoniTUB marked this pull request as ready for review July 29, 2026 08:55
final List<FrontendValue> resolved = new ArrayList<>(terms.size());


// TODO also use Solr's POST method to avoid too long URIs (see sendQuery)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noch offen?

}

public record AutocompleteRequest(@NonNull Optional<String> text, @NonNull OptionalInt page, @NonNull OptionalInt pageSize) {
public record AutocompleteRequest(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, das ist die Magic Sauce! Cool

Comment thread scripts/load_e2e_data.sh
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gute aber unrelated änderung heir?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants