mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
commented out domain match check during auth
This commit is contained in:
parent
f0582e18f7
commit
1b548ea03e
2 changed files with 646 additions and 647 deletions
File diff suppressed because one or more lines are too long
|
@ -15,7 +15,6 @@ import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -101,14 +100,14 @@ func (m *middleware) Authorize(w http.ResponseWriter, r *http.Request, next http
|
||||||
}
|
}
|
||||||
|
|
||||||
rc.Subdomain = org.Domain
|
rc.Subdomain = org.Domain
|
||||||
dom := organization.GetSubdomainFromHost(r)
|
// dom := organization.GetSubdomainFromHost(r)
|
||||||
dom2 := organization.GetRequestSubdomain(r)
|
// dom2 := organization.GetRequestSubdomain(r)
|
||||||
|
|
||||||
if org.Domain != dom && org.Domain != dom2 {
|
// if org.Domain != dom && org.Domain != dom2 {
|
||||||
m.Runtime.Log.Info(fmt.Sprintf("domain mismatch %s vs. %s vs. %s", dom, dom2, org.Domain))
|
// m.Runtime.Log.Info(fmt.Sprintf("domain mismatch %s vs. %s vs. %s", dom, dom2, org.Domain))
|
||||||
response.WriteUnauthorizedError(w)
|
// response.WriteUnauthorizedError(w)
|
||||||
return
|
// return
|
||||||
}
|
// }
|
||||||
|
|
||||||
// If we have bad auth token and the domain allows anon access
|
// If we have bad auth token and the domain allows anon access
|
||||||
// then we generate guest context.
|
// then we generate guest context.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue