CGI Username does not update with diff user login

  • Have you checked to see if there is anything in your code that might cause the app to stay running rather than exit?
  • Take the sledgehammer and force an exit at the end of a request.

[quote=296317:@Justin Elliott]I’ve added my comments to the feedback link that Greg posted above. The feedback report says that it was fixed on 9/21/16, but I didn’t see it mentioned as implemented in the 2016r3 release notes. When will the fix be released? R4?

As another test point I’ve adding logging of all env’s in the Session.PrepareSession event and these userid variables get set once and then never change:

REMOTE_USER=justin_elliott HTTP_X_REMOTE_USER=justin_elliott

Again, if I kill the CGI executable that is running and then it gets relaunched it successfully gets the first logged in user’s ID and then never changes again.

apache 46884 0.4 1.2 304592 23944 ? Ssl 14:56 0:05 /var/www/cgi-bin/clmmactools/ProteusMACAddressMapper/ProteusMACAddressMapper --port=34779

Any other ideas?[/quote]
Something to note… the process you’ve listed here is not the cgi script. It’s the binary application itself.

I suggest that you try this with the current beta and see if it fixes your problem. Many of the env vars were only set when the app was first launched, but in the beta you should be able to get them for each session.

[quote=296385:@Greg O’Lone]Something to note… the process you’ve listed here is not the cgi script. It’s the binary application itself.

I suggest that you try this with the current beta and see if it fixes your problem. Many of the env vars were only set when the app was first launched, but in the beta you should be able to get them for each session.[/quote]

Yep, understood on the binary versus perl cgi. Apache calls the perl CGI script that launches the binary CGI (if not already running) and communicates via a socket.

apache 63755 9.2 0.8 302528 15944 ? Ssl 06:57 0:00 /var/www/cgi-bin/clmmactools/ProteusMACAddressMapper/ProteusMACAddressMapper --port=30969 apache 63793 1.0 0.2 34684 4864 ? S 06:57 0:00 /usr/bin/perl -w /var/www/cgi-bin/clmmactools/ProteusMACAddressMapper/proteusmacaddressmapper.cgi

I tested with the beta and it fixed the issue. Thanks!

I’m not confident that I would have found that Feedback report for this particular issue, so thanks for posting that.

Hi @Justin Elliott and @Greg O’Lone

I’ve replicated the exact same issue with Xojo 2019r3.1 which surprised me since it seemed to be fixed in 2016r4.

Justin, do you still use REMOTE_USER in your app? Does it still work?

Thanks

Matthieu

Never mind! REMOTE_USER is still set to the first user to login in the environnement variables but the sessions headers are ok.