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:
2454
2454
}
2455
2455
2456
2456
func (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
+ }
2458
2469
//setupAction := c.Request.URL.Query()["setup_action"][0]
2459
2470
codeParams , codeExists := c .Request .URL .Query ()["code" ]
2460
2471
if ! codeExists || len (codeParams ) == 0 {
You can’t perform that action at this time.
0 commit comments