Skip to content

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

@rabbah

Description

@rabbah
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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions