Skip to content

Prevent panicing if license expiry is not populated#49844

Merged
rosstimothy merged 1 commit intomasterfrom
tross/fix_license_expiry_panic
Dec 6, 2024
Merged

Prevent panicing if license expiry is not populated#49844
rosstimothy merged 1 commit intomasterfrom
tross/fix_license_expiry_panic

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Panic was caught by a customer running 16.4.9

http: panic serving [2a13:5947:111:20::1c86:2e30]:49995: runtime error: invalid memory address or nil pointer dereference goroutine 597943 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1903 +0xbe
panic({0x556eb28d1e60?, 0x556eb95ef2d0?})
    runtime/panic.go:770 +0x132
github.com/gravitational/teleport/lib/web.(*Handler).getUserContext(0xc002599408, {0xc002599408?, 0xc00bb18b40?}, 0xc00f4859e0, {0x1?, 0x1?, 0xc00bb18b40?}, 0xc00bb18b40, {0x556eb3eeb8f8, 0xc001af2f20})
    github.com/gravitational/teleport/lib/web/apiserver.go:1230 +0x6ef
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithClusterAuth.func50({0x556eb3ea4940, 0xc00d6158c0}, 0xc00f4859e0, {0xc00d615920, 0x1, 0x3})

changelog: prevent a panic if the auth server does not provide a license expiry

Panic was caught by a customer running 16.4.9

http: panic serving [2a13:5947:111:20::1c86:2e30]:49995: runtime error: invalid memory address or nil pointer dereference
goroutine 597943 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1903 +0xbe
panic({0x556eb28d1e60?, 0x556eb95ef2d0?})
    runtime/panic.go:770 +0x132
github.com/gravitational/teleport/lib/web.(*Handler).getUserContext(0xc002599408, {0xc002599408?, 0xc00bb18b40?}, 0xc00f4859e0, {0x1?, 0x1?, 0xc00bb18b40?}, 0xc00bb18b40, {0x556eb3eeb8f8, 0xc001af2f20})
    github.com/gravitational/teleport/lib/web/apiserver.go:1230 +0x6ef
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithClusterAuth.func50({0x556eb3ea4940, 0xc00d6158c0}, 0xc00f4859e0, {0xc00d615920, 0x1, 0x3})
@rosstimothy rosstimothy enabled auto-merge December 5, 2024 20:02
@zmb3 zmb3 requested a review from rudream December 5, 2024 20:22
@rosstimothy rosstimothy added this pull request to the merge queue Dec 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 6, 2024
@rosstimothy rosstimothy added this pull request to the merge queue Dec 6, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Dec 6, 2024
@rosstimothy rosstimothy added this pull request to the merge queue Dec 6, 2024
Merged via the queue into master with commit 1bed1ad Dec 6, 2024
@rosstimothy rosstimothy deleted the tross/fix_license_expiry_panic branch December 6, 2024 14:45
@public-teleport-github-review-bot
Copy link
Copy Markdown

@rosstimothy See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Create PR
branch/v17 Create PR

carloscastrojumo pushed a commit to carloscastrojumo/teleport that referenced this pull request Feb 19, 2025
)

Panic was caught by a customer running 16.4.9

http: panic serving [2a13:5947:111:20::1c86:2e30]:49995: runtime error: invalid memory address or nil pointer dereference
goroutine 597943 [running]:
net/http.(*conn).serve.func1()
    net/http/server.go:1903 +0xbe
panic({0x556eb28d1e60?, 0x556eb95ef2d0?})
    runtime/panic.go:770 +0x132
github.com/gravitational/teleport/lib/web.(*Handler).getUserContext(0xc002599408, {0xc002599408?, 0xc00bb18b40?}, 0xc00f4859e0, {0x1?, 0x1?, 0xc00bb18b40?}, 0xc00bb18b40, {0x556eb3eeb8f8, 0xc001af2f20})
    github.com/gravitational/teleport/lib/web/apiserver.go:1230 +0x6ef
github.com/gravitational/teleport/lib/web.(*Handler).bindDefaultEndpoints.(*Handler).WithClusterAuth.func50({0x556eb3ea4940, 0xc00d6158c0}, 0xc00f4859e0, {0xc00d615920, 0x1, 0x3})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants