GeezerVison is showing github.com — Java 21 regression bug: in a .jsp, request.getUserPrincipal() returns null despite being logged in · Issue #241 · GoogleCloudPlatform/appengine-java-standard
Java 21 regression bug: in a .jsp, request.getUserPrincipal() returns null despite being logged in #241DescriptionWhen setting java21 in appengine-web.xml,
in a .jsp, the call request.getUserPrincipal() returns null despite being logged in. Activityludoch commented on Jul 2, 2024 Both prod and local server? cyril-briquet commented on Jul 2, 2024 Local server yes; production server I haven't tried. cyril-briquet commented on Jul 2, 2024
Both prod and local server?
I've just tried on a prod server: the answer is yes, both indeed. added a commit that references this issue on Jul 3, 2024Issue #241 - fix deferred authentication for Java21 EE10 runtime lachlan-roberts commented on Jul 3, 2024 Opened PR #243 to fix this. ludoch commented on Jul 3, 2024 cyril-briquet commented on Aug 4, 2024 Update: bug is fixed in local devserver, but not in production server ludoch commented on Aug 4, 2024 A bit strange as the code area for the fix also applies to prod... Maybe one thing to try first is to go to the admin console, app engine instances page and try to kill whatever running instance you see to force a restart?
Restarts are not automatically done anymore... cyril-briquet commented on Aug 4, 2024 Thanks for your rapid answer.
As suggested, I went to the admin console, AE instances page and killed the one instance that was running (apparently, it always restarts automatically even before I try to access the app in production as a user).
FWIW, here is the code that correctly displays the user's e-mail with the dev server and null with the prod server:
<%= (request.getUserPrincipal() != null) ? request.getUserPrincipal().getName() : "null" %> ludoch commented on Aug 5, 2024 Thanks!
Sorry about that, we believe 3d53db9 should address it. Tested only manually, looking for a prod e2e test... cyril-briquet commented on Aug 6, 2024 test-files.txt
Please find here as an attached file the source code of a test web app exercising the bug cyril-briquet commented on Sep 20, 2024 Works for me: bug not observed any more on the production server.
Thanks for the patches. Reacted by Ludovic Champenois added a commit that references this issue on Nov 12, 2024Issue #241 - fix deferred authentication for Java21 EE10 runtime
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|