Skip to content

Commit

Permalink
bulker: add keepOriginalNames to known options
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Nov 6, 2024
1 parent 527fe72 commit 030636a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bulkerlib/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type StreamOption func(*StreamOptions)
var optionsRegistry = make(map[string]ParseableOption)

// Not used by bulker. Just added here to be treated as known options and don't print errors
var ignoredOptions = []string{"functions", "streams", "dataLayout", "events", "debugTill", "hosts", "schedule", "timezone", "storageKey", "tableNamePrefix", "multithreading"}
var ignoredOptions = []string{"functions", "streams", "dataLayout", "events", "debugTill", "hosts", "schedule", "timezone", "storageKey", "tableNamePrefix", "multithreading", "keepOriginalNames"}

var (
BatchSizeOption = ImplementationOption[int]{
Expand Down
4 changes: 4 additions & 0 deletions ingest/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ func hashApiKey(token string, salt string, secret string) string {

func (r *Router) checkHash(hash string, secret string) bool {
pk := strings.SplitN(hash, ".", 2)
if len(pk) < 2 {
r.Errorf("invalid hash format: %s", hash)
return false
}
salt := pk[0]
hashPart := pk[1]
for _, globalSecret := range r.config.GlobalHashSecrets {
Expand Down

0 comments on commit 030636a

Please sign in to comment.