Skip to content

fix(LicenseDB): correct UUID nil checks, OIDC base64url decoding, sim…#216

Open
shaheemazmalmmd wants to merge 1 commit into
mainfrom
refactor/licenseDb-UUID
Open

fix(LicenseDB): correct UUID nil checks, OIDC base64url decoding, sim…#216
shaheemazmalmmd wants to merge 1 commit into
mainfrom
refactor/licenseDb-UUID

Conversation

@shaheemazmalmmd

@shaheemazmalmmd shaheemazmalmmd commented May 25, 2026

Copy link
Copy Markdown
Member

correct UUID nil checks in obligation hooks (.Id.String() == "" || == uuid.Nil),
fix category validation checking wrong field (Classification.Id = Category.Id),
replace base64.StdEncoding with base64.RawURLEncoding in GetKid (restoring OIDC auth),
fix inverted active default in GetAllUser (was returning inactive users),
guard NIL UserEmail/UserName dereferences in email notifications, and
remove panic(err) on ExternalRef JSON unmarshal.

…ilarity threshold races,

                nil dereferences, and inverted active user default

Signed-off-by: Shaheem Azmal M MD <shaheem.azmal@gmail.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread pkg/models/licenses.go

if err := json.Unmarshal(bytes, &ext); err != nil {
panic(err)
log.Printf("failed to unmarshal external_ref for license %v: %v", dto.Shortname, err)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zap logger must be used and in this implementation, function won't stop execution after an error

Comment thread pkg/utils/util.go
}
parsed, err := strconv.ParseFloat(thresholdStr, 64)
if err != nil {
log.Printf("Invalid SIMILARITY_THRESHOLD '%s', using default %.1f", thresholdStr, defaultThreshold)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

zap logger must be used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants