Not sending auth key in webhook callbacks anymore
This commit is contained in:
@@ -24,7 +24,7 @@ require (
|
|||||||
github.com/h2non/filetype v1.1.3
|
github.com/h2non/filetype v1.1.3
|
||||||
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
|
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da // indirect
|
||||||
github.com/satori/go.uuid v1.2.0
|
github.com/satori/go.uuid v1.2.0
|
||||||
github.com/shuffle/shuffle-shared v0.2.27
|
github.com/shuffle/shuffle-shared v0.2.28
|
||||||
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
go4.org v0.0.0-20201209231011-d4a079459e60 // indirect
|
||||||
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
|
golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce
|
||||||
google.golang.org/api v0.65.0
|
google.golang.org/api v0.65.0
|
||||||
|
|||||||
+11
-9
@@ -2247,7 +2247,7 @@ func handleWebhookCallback(resp http.ResponseWriter, request *http.Request) {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
resp.WriteHeader(200)
|
resp.WriteHeader(200)
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": true, "execution_id": "%s", "authorization": "%s"}`, workflowExecution.ExecutionId, workflowExecution.Authorization)))
|
resp.Write([]byte(fmt.Sprintf(`{"success": true, "execution_id": "%s"}`, workflowExecution.ExecutionId)))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3237,14 +3237,6 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User) {
|
|||||||
fmt.Sprintf("%s:%s", baseDockerName, versionName),
|
fmt.Sprintf("%s:%s", baseDockerName, versionName),
|
||||||
}
|
}
|
||||||
|
|
||||||
err = buildImage(dockerTags, dockerLocation)
|
|
||||||
if err != nil {
|
|
||||||
log.Printf("[ERROR] Docker build error: %s", err)
|
|
||||||
resp.WriteHeader(500)
|
|
||||||
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Error in Docker build: %s"}`, err)))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
found := false
|
found := false
|
||||||
foundNumber := 0
|
foundNumber := 0
|
||||||
log.Printf("[INFO] Checking for api with ID %s", newmd5)
|
log.Printf("[INFO] Checking for api with ID %s", newmd5)
|
||||||
@@ -3328,6 +3320,16 @@ func buildSwaggerApp(resp http.ResponseWriter, body []byte, user shuffle.User) {
|
|||||||
shuffle.DeleteCache(ctx, cacheKey)
|
shuffle.DeleteCache(ctx, cacheKey)
|
||||||
shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id))
|
shuffle.DeleteCache(ctx, fmt.Sprintf("apps_%s", user.Id))
|
||||||
|
|
||||||
|
// Doing this last to ensure we can copy the docker image over
|
||||||
|
// even though builds fail
|
||||||
|
err = buildImage(dockerTags, dockerLocation)
|
||||||
|
if err != nil {
|
||||||
|
log.Printf("[ERROR] Docker build error: %s", err)
|
||||||
|
resp.WriteHeader(500)
|
||||||
|
resp.Write([]byte(fmt.Sprintf(`{"success": false, "reason": "Error in Docker build: %s"}`, err)))
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
log.Printf("[DEBUG] Successfully built app %s (%s)", api.Name, api.ID)
|
log.Printf("[DEBUG] Successfully built app %s (%s)", api.Name, api.ID)
|
||||||
if len(user.Id) > 0 {
|
if len(user.Id) > 0 {
|
||||||
resp.WriteHeader(200)
|
resp.WriteHeader(200)
|
||||||
|
|||||||
Reference in New Issue
Block a user