~shreyasminocha/codeskulptor-cli

d330c18dc682927cbcdc0893762fc741605aabf6 — Shreyas Minocha 2 years ago 7367d38
Update bucket, policy, and signature

The annual tradition some thirty days late.
1 files changed, 6 insertions(+), 6 deletions(-)

M bin/csk
M bin/csk => bin/csk +6 -6
@@ 22,21 22,21 @@ upload() {
    LOCAL_FILE="$2"
    NAME="${3:-$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 11; echo '')}"

    BUCKET='user306'
    BUCKET='user307'
    BUCKET_URI="https://codeskulptor-${BUCKET}.commondatastorage.googleapis.com"

    REMOTE_FILE="${BUCKET}_${NAME}.py"

    # account identifier
    GOOGLE_ACCESS_ID='GOOGXAAMGSTWEXTMWEN3GH7F'
    GOOGLE_ACCESS_ID='GOOGAY6OWUZ5QXHG4JLCAAZ3'

    # decoded (base64) from `form#codeform input#policy` on CodeSkulptor
    # do not change *at all* unless you know what you're doing
    POLICY='{"expiration": "2022-01-01T12:00:00.000Z",
    POLICY='{"expiration": "2023-01-01T12:00:00.000Z",

  "conditions": [
    {"bucket": "codeskulptor-user306"},
    ["starts-with", "$key", "user306"],
    {"bucket": "codeskulptor-user307"},
    ["starts-with", "$key", "user307"],
    ["eq", "$Content-Type", "text/x-python"],
    ["content-length-range", 0, 65536]
  ]


@@ 45,7 45,7 @@ upload() {

    # base64-encoded signature of the policy
    # created with a key associated with the account described by the access ID
    SIGNATURE='WcXIAnNTPO7Wgf60wI5D5gw6c50='
    SIGNATURE='eT5Qm/elm1y1B/9wzoB4M0rU/lA='

    # These values were lifted from fields in `form#codeform` on CodeSkulptor.
    # Should the values of those fields change, these would also need to be