Skip to content
This repository was archived by the owner on Dec 15, 2021. It is now read-only.
This repository was archived by the owner on Dec 15, 2021. It is now read-only.

kubeless can not download function from url which contains & #1092

@yvz5

Description

@yvz5

Is this a BUG REPORT or FEATURE REQUEST?: BUG

What happened: I have created an azure blob storage and uploaded the function as a zip file. created the sas token and got a link which includes & signs. e.g. azure.blob.com/function.zip?hi&hello=world

What you expected to happen: that kubeless escapes the curl command inside the prepare container

How to reproduce it (as minimally and precisely as possible): just use any URL with & in it

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version):
  • Kubeless version (use kubeless version):
  • Cloud provider or physical cluster: azure

So this is really weird because I would expect the curl command to be escaped.

If I url encode the link and replace & with %26 this time I get resource is not found from azure and checksums wont match.

the arguments of the prepare container:

 Args:
      curl https://xxx.blob.core.windows.net/functions/function.zip?sp=r&st=2019-10-30T14:29:28Z&se=2019-12-01T22:29:28Z&spr=https&sv=2019-02-02&sr=b&sig=xxx%3D -L --silent --output /tmp/func.fromurl && echo '71aecbb768cc278a590c4dbc667531b385bf88eb56ab3dc77558dd52eace4cd8  /tmp/func.fromurl' > /tmp/func.sha256 && sha256sum -c /tmp/func.sha256 && unzip -o /tmp/func.fromurl -d /kubeless && cp /src/package.json /kubeless

logs from prepare container:

C:\src\deployment>kubectl logs fn-6b87fd859-fm28p -c prepare
sh: -L: not found

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions