Bug 34651 - Searching system preferences - using a bracket ( either ( or ) ) generates an error trace
Summary: Searching system preferences - using a bracket ( either ( or ) ) generates an...
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-30 00:03 UTC by David Nind
Modified: 2023-08-30 00:03 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Nind 2023-08-30 00:03:03 UTC
Searching system preferences using just a bracket (either ( or )) generates an error trace.[1]

Other characters, such as {, !, ;, <, @, #, %, and so on, don't do the same.

Ideally, you should just get search results or a 'No system preferences matched your search for: XXXX' message.


[1] Error trace:

Unmatched ( in regex; marked by <-- HERE in m/^( <-- HERE $/ at /kohadevbox/koha/admin/preferences.pl line 201

    in CGI::Compile::ROOT::kohadevbox_koha_admin_preferences_2epl::TransformPrefsToHTML at /kohadevbox/koha/admin/preferences.pl line 201

      198:                         my $chunk = _get_chunk( $value, %$piece );
      199: 
      200:                         # No highlighting of inputs yet, but would be useful
      201:                         $chunk->{'highlighted'} = 1 if ( $searchfield && $name =~ /^$searchfield$/i );
      202: 
      203:                         if ( $name eq 'Pseudonymization' && ! C4::Context->config('bcrypt_settings')) {
      204:                             push @warnings, 'bcrypt_config_not_set';

    Show function arguments