fix(xo-web/smart-backup): StringNode → RegExpNode to anchor strings (#4085)
Fixes #4078
This commit is contained in:
committed by
Julien Fontanet
parent
16b3fbeb16
commit
d06c3e3dd8
@@ -12,6 +12,7 @@
|
||||
- [Home] Always sort the items by their names as a secondary sort criteria [#3983](https://github.com/vatesfr/xen-orchestra/issues/3983) (PR [#4047](https://github.com/vatesfr/xen-orchestra/pull/4047))
|
||||
- [Remotes] Fixes `spawn mount EMFILE` error during backup
|
||||
- Properly redirect to sign in page instead of being stuck in a refresh loop
|
||||
- [Backup-ng] No more false positives when list matching VMs on Home page [#4078](https://github.com/vatesfr/xen-orchestra/issues/4078) (PR [#4085](https://github.com/vatesfr/xen-orchestra/pull/4085))
|
||||
|
||||
### Released packages
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as CM from 'complex-matcher'
|
||||
import { get, identity, isEmpty } from 'lodash'
|
||||
import { escapeRegExp, get, identity, isEmpty } from 'lodash'
|
||||
|
||||
import { EMPTY_OBJECT } from './../utils'
|
||||
|
||||
@@ -59,7 +59,7 @@ export const constructSmartPattern = (
|
||||
|
||||
const valueToComplexMatcher = pattern => {
|
||||
if (typeof pattern === 'string') {
|
||||
return new CM.String(pattern)
|
||||
return new CM.RegExpNode(`^${escapeRegExp(pattern)}$`)
|
||||
}
|
||||
|
||||
if (Array.isArray(pattern)) {
|
||||
|
||||
Reference in New Issue
Block a user