Skip to content

Commit

Permalink
🐛 Fix bulk requesta not working with path template mongo-mount + refa…
Browse files Browse the repository at this point in the history
…ctored MongoRequest
  • Loading branch information
ujibang committed Nov 14, 2024
1 parent 5822596 commit ad78d74
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 175 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.regex.Pattern;
import java.util.stream.Collectors;

import org.apache.commons.jxpath.JXPathContext;
Expand Down Expand Up @@ -427,7 +428,7 @@ private static Map<String, Object> overrideConfiguration(Map<String, Object> con
var _pwd = cs.getPassword();
if (_pwd != null) {
var pwd = new String(_pwd);
maskedValue.put(k, svalue.replaceFirst(pwd, MASK));
maskedValue.put(k, svalue.replaceFirst(Pattern.quote(pwd), MASK));
}
} catch (Throwable t) {
maskedValue.put(k, mapValue);
Expand All @@ -444,7 +445,7 @@ private static Map<String, Object> overrideConfiguration(Map<String, Object> con
var _pwd = cs.getPassword();
if (_pwd != null) {
var pwd = new String(_pwd);
LOGGER.info(LOG_PATTERN, o.path(), svalue.replaceFirst(pwd, MASK));
LOGGER.info(LOG_PATTERN, o.path(), svalue.replaceFirst(Pattern.quote(pwd), MASK));
}
} catch (Throwable t) {
LOGGER.info(LOG_PATTERN, o.path(), o.value());
Expand Down
Loading

0 comments on commit ad78d74

Please sign in to comment.