mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-08-17 16:07:18 +02:00
add missing timeout to oauth handler
Signed-off-by: Ronni Skansing <rskansing@gmail.com>
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"io"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/AzureAD/microsoft-authentication-library-for-go/apps/confidential"
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -220,7 +221,9 @@ func (s *SSO) HandlEntraIDCallback(
|
||||
}
|
||||
|
||||
func (s *SSO) getMsGraphMe(ctx context.Context, accessToken string) (*MsGraphUserInfo, error) {
|
||||
client := &http.Client{}
|
||||
client := &http.Client{
|
||||
Timeout: 10 * time.Second,
|
||||
}
|
||||
req, err := http.NewRequestWithContext(ctx, "GET", "https://graph.microsoft.com/v1.0/me", nil)
|
||||
if err != nil {
|
||||
return nil, errs.Wrap(err)
|
||||
|
||||
Reference in New Issue
Block a user