File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2454,7 +2454,18 @@ jobs:
24542454}
24552455
24562456func (d DiggerController ) GithubAppCallbackPage (c * gin.Context ) {
2457- installationId := c .Request .URL .Query ()["installation_id" ][0 ]
2457+ installationIdParams , installationIdExists := c .Request .URL .Query ()["installation_id" ]
2458+ if ! installationIdExists || len (installationIdParams ) == 0 {
2459+ slog .Error ("There was no installation_id in the url query parameters" )
2460+ c .String (http .StatusBadRequest , "could not find the installation_id query parameter for github app" )
2461+ return
2462+ }
2463+ installationId := installationIdParams [0 ]
2464+ if len (installationId ) < 1 {
2465+ slog .Error ("Installation_id parameter is empty" )
2466+ c .String (http .StatusBadRequest , "installation_id parameter for github app is empty" )
2467+ return
2468+ }
24582469 //setupAction := c.Request.URL.Query()["setup_action"][0]
24592470 codeParams , codeExists := c .Request .URL .Query ()["code" ]
24602471 if ! codeExists || len (codeParams ) == 0 {
You can’t perform that action at this time.
0 commit comments