1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-09-16 09:06:36 +02:00
* sync with MontFerret/ferret

* fix --param handling

When params is converted to map it uses strings.Split,
which slices a string into all substrings separated by :.
This commit is contained in:
3timeslazy
2019-04-11 14:33:50 +03:00
committed by Tim Voronov
parent e65c89035a
commit d8ef12c3f7
2 changed files with 3 additions and 4 deletions

View File

@@ -89,7 +89,6 @@ You can download latest binaries from [here](https://github.com/MontFerret/ferre
* Chrome or Docker
#### Development
* GoDep
* GNU Make
* ANTLR4 >=4.7.1
@@ -540,5 +539,5 @@ LET c = COOKIES_GET(doc, "baz")
FOR cookie IN doc.cookies
RETURN cookie.name
```
```

View File

@@ -29,7 +29,7 @@ func (p *Params) ToMap() (map[string]interface{}, error) {
res := make(map[string]interface{})
for _, entry := range *p {
pair := strings.Split(entry, ":")
pair := strings.SplitN(entry, ":", 2)
if len(pair) < 2 {
return nil, core.Error(core.ErrInvalidArgument, entry)