apache / apache/openwhisk

action put validation error when code is the string "true"

Open
#4,884 1 comment 0 reactions 0 assignees View on GitHub
bug controller
Dominant language
Scala
Stars
6.8k
Forks
1.2k
Avg merge
2d 14h
Merged PRs (30d)
2

Description

```
echo 'true' > oops.js
```

```
> wsk action create oops oop.js --kind nodejs:default
error: Unable to create action 'oops': There was an internal server error. (code pkXxz1XCQ1ACuw5bVLJRAcxfiCgS3gch)
```

controller logs show:
```
[2020-04-16T07:14:22.949Z] [ERROR] [#tid_9nDLFGWhC3gCXtau8wa7wgvNSZ94O9VS] [ActionsApi] [PUT] entity failed: Illegal base64 character a
```

`wsk` is posting the following PUT:
```
{"namespace":"_","name":"y","exec":{"kind":"nodejs:default","code":"true\n"}}
```

i suspect the b64 regex matches incorrectly and thinks `true` is base64 encoded string.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.