Project

General

Profile

Bug #16275

Add a generic method to escape regex chars in a string

Added by Félix DALLIDET 2 months ago. Updated about 2 months ago.

Status:
Released
Priority:
N/A
Category:
Generic methods
Target version:
Severity:
User visibility:
Effort required:
Priority:
0

Description

We may want to use a given string in Rudder which may contains several regex chars that need to be escaped when passed to a regex intended input.
Obvious case is the "File content" technique and its replacement field.

The method will take the complete name of an already defined variable (i.e. prefix.name) and defined a prefix.name_escaped variable with the proper escaped string

Associated revisions

Revision d1c35447 (diff)
Added by Félix DALLIDET 2 months ago

Fixes #16275: Add a generic method to escape regex chars in a string

History

#1

Updated by Félix DALLIDET 2 months ago

  • Status changed from New to In progress
  • Assignee set to Félix DALLIDET
#2

Updated by Félix DALLIDET 2 months ago

  • Status changed from In progress to Pending technical review
  • Assignee changed from Félix DALLIDET to Alexis MOUSSET
  • Pull Request set to https://github.com/Normation/ncf/pull/1117
#3

Updated by Félix DALLIDET 2 months ago

  • Status changed from Pending technical review to Pending release
#6

Updated by Vincent MEMBRÉ about 2 months ago

  • Status changed from Pending release to Released

This bug has been fixed in Rudder 5.0.15 which was released today.

Also available in: Atom PDF