Skip to content

Commit

Permalink
whitelist concat function (#134)
Browse files Browse the repository at this point in the history
### TL;DR
Added support for the `concat` function in the allowed functions list.

### What changed?
Added the `concat` function to the `allowedFunctions` map, enabling string concatenation operations.

### How to test?
1. Use the `concat` function in your queries or templates
2. Verify that the function executes without permission errors
3. Confirm that string concatenation works as expected

### Why make this change?
String concatenation is a fundamental operation needed for data manipulation and string formatting. Adding the `concat` function provides users with the ability to combine strings dynamically within their queries or templates.
  • Loading branch information
iuwqyir authored Jan 15, 2025
2 parents 313d5ab + f5c645f commit bcaf1ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/common/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ var allowedFunctions = map[string]struct{}{
"if": {},
"toStartOfDay": {},
"toDate": {},
"concat": {},
}

var disallowedPatterns = []string{
Expand Down

0 comments on commit bcaf1ca

Please sign in to comment.