You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2020/04/16 11:33:35 UTC

[GitHub] [openwhisk] rabbah opened a new issue #4884: action put validation error when code is the string "true"

rabbah opened a new issue #4884: action put validation error when code is the string "true"
URL: https://github.com/apache/openwhisk/issues/4884
 
 
   ```
   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. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk] rabbah edited a comment on issue #4884: action put validation error when code is the string "true"

Posted by GitBox <gi...@apache.org>.
rabbah edited a comment on issue #4884: action put validation error when code is the string "true"
URL: https://github.com/apache/openwhisk/issues/4884#issuecomment-615899936
 
 
   The regex is 
   
   ```
   ^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$
   ```
   
   which will match any 4 character string.
   
   In the grand scheme, this is an unlikely bug (no valid function for the languages we support can match the base64 regex, I think) but fixing it is not a trivial amount of work because of the inter dependencies between API and tools.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [openwhisk] rabbah commented on issue #4884: action put validation error when code is the string "true"

Posted by GitBox <gi...@apache.org>.
rabbah commented on issue #4884: action put validation error when code is the string "true"
URL: https://github.com/apache/openwhisk/issues/4884#issuecomment-615899936
 
 
   The regex is 
   
   ```
   ^([A-Za-z0-9+\/]{4})*([A-Za-z0-9+\/]{4}|[A-Za-z0-9+\/]{3}=|[A-Za-z0-9+\/]{2}==)$
   ```
   
   which will match any 4 character string.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services