View | Details | Raw Unified | Return to bug 37902
Collapse All | Expand All

(-)a/Koha/REST/Plugin/Query.pm (-5 / +4 lines)
Lines 195-201 is raised. Link Here
195
            my $match = $reserved_params->{_match} // 'contains';
195
            my $match = $reserved_params->{_match} // 'contains';
196
196
197
            foreach my $param ( keys %{$filtered_params} ) {
197
            foreach my $param ( keys %{$filtered_params} ) {
198
                if ( $match eq 'contains' ) {
198
                if ( $match eq 'exact' || $filtered_params->{$param} =~ m[^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}]) {
199
                    $params->{$param} = $filtered_params->{$param};
200
                }
201
                elsif ( $match eq 'contains' ) {
199
                    $params->{$param} =
202
                    $params->{$param} =
200
                      { like => '%' . $filtered_params->{$param} . '%' };
203
                      { like => '%' . $filtered_params->{$param} . '%' };
201
                }
204
                }
Lines 205-213 is raised. Link Here
205
                elsif ( $match eq 'ends_with' ) {
208
                elsif ( $match eq 'ends_with' ) {
206
                    $params->{$param} = { like => '%' . $filtered_params->{$param} };
209
                    $params->{$param} = { like => '%' . $filtered_params->{$param} };
207
                }
210
                }
208
                elsif ( $match eq 'exact' ) {
209
                    $params->{$param} = $filtered_params->{$param};
210
                }
211
                else {
211
                else {
212
                    # We should never reach here, because the OpenAPI plugin should
212
                    # We should never reach here, because the OpenAPI plugin should
213
                    # prevent invalid params to be passed
213
                    # prevent invalid params to be passed
214
- 

Return to bug 37902