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 2018/08/29 16:19:04 UTC

[GitHub] chetanmeh commented on a change in pull request #3979: Treat blackbox action code as attachment

chetanmeh commented on a change in pull request #3979: Treat blackbox action code as attachment
URL: https://github.com/apache/incubator-openwhisk/pull/3979#discussion_r213744606
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/core/entity/Exec.scala
 ##########
 @@ -340,6 +349,13 @@ protected[core] object Exec extends ArgNormalizer[Exec] with DefaultJsonProtocol
       (t.length > 0) && (t.length % 4 == 0) && isBase64Pattern.matcher(t).matches()
     } else false
   }
+
+  private def isBinary(code: JsValue, obj: JsObject): Boolean = {
+    code match {
+      case JsString(c) => isBinaryCode(c)
 
 Review comment:
   Not sure on that - Current read flow would happen for 2 cases
   
   1. Deserializing the json obtained from `ArtifactStore` where the `binary` flag would have been set at time of serialization
   2. Deserializing the user providing json
   
   Would it fine to trust the `binary` field if provided by user? Probably yes ... but wanted to check on that 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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