chiark
/
gitweb
/
~ian
/
hippotat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b9f891
)
config: bail on same quote in quotes
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 01:46:58 +0000
(
02:46
+0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sun, 8 Aug 2021 01:48:47 +0000
(
02:48
+0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
src/config.rs
patch
|
blob
|
history
diff --git
a/src/config.rs
b/src/config.rs
index 3a45eb81928a974d4c3071e4767bb59278a748dc..d899348ee59afc791cbf553f0ad0a14495f33907 100644
(file)
--- a/
src/config.rs
+++ b/
src/config.rs
@@
-286,6
+286,12
@@
impl Aggregate {
|| anyhow!("mismatched quotes around quoted value")
)?
.to_owned();
+ if unq.contains(&raw[0..1]) {
+ throw!(anyhow!(
+ "quoted value contains quote (escaping not supported)"
+ ))
+ }
+
Ok::<_,AE>(unq)
})()
.with_context(|| format!("key {:?}", key))