Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion oryx/httpx/ssrf.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ import (
"time"

"github.com/gobwas/glob"
"github.com/ory/x/ipx"
"go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"

"github.com/ory/x/ipx"
)

var _ http.RoundTripper = (*noInternalIPRoundTripper)(nil)
Expand Down
3 changes: 2 additions & 1 deletion oryx/otelx/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"net/http"
"strings"

"github.com/ory/x/httprouterx"
"go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp"

"github.com/ory/x/httprouterx"
)

var withDefaultFilters = otelhttp.WithFilter(func(r *http.Request) bool {
Expand Down
3 changes: 2 additions & 1 deletion oryx/prometheusx/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import (
"time"

grpcPrometheus "github.com/grpc-ecosystem/go-grpc-prometheus"
"github.com/ory/x/httprouterx"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/urfave/negroni"

"github.com/ory/x/httprouterx"
)

type HTTPMetrics struct {
Expand Down
3 changes: 2 additions & 1 deletion oryx/region/region.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ package region
import (
"database/sql/driver"

"github.com/ory/herodot"
"github.com/pkg/errors"

"github.com/ory/herodot"
)

// Region is an Ory Network region. Specific regions map to a single CRDB
Expand Down
2 changes: 1 addition & 1 deletion oryx/watcherx/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type directoryWatcher struct {
// potentially by external callers (e.g. tests) concurrently.
subDirsMtx sync.RWMutex
subDirs map[string]struct{}
w *fsnotify.Watcher
w *fsnotify.Watcher
}

func (w *directoryWatcher) handleEvent(ctx context.Context, e fsnotify.Event) {
Expand Down
2 changes: 1 addition & 1 deletion selfservice/strategy/code/strategy_recovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ func (s *Strategy) Recover(w http.ResponseWriter, r *http.Request, f *recovery.F
WithRequest(r).
Debugf("A recovery flow with `DangerousSkipCSRFCheck` set has been submitted, skipping anti-CSRF measures.")
} else if err := flow.EnsureCSRF(s.deps, r, f.Type, s.deps.Config().DisableAPIFlowEnforcement(ctx), s.deps.GenerateCSRFToken, body.CSRFToken); err != nil {
// If a CSRF violation occurs the flow is most likely FUBAR, as the user either lost the CSRF token, or an attack occured.
// If a CSRF violation occurs the flow is most likely FUBAR, as the user either lost the CSRF token, or an attack occurred.
// In this case, we just issue a new flow and "abandon" the old flow.
return s.retryRecoveryFlow(w, r, flow.TypeBrowser, RetryWithError(err))
}
Expand Down
Loading