In previous and currently shipping (v 3.0) versions of Safari, the user's environment variables (both those specified in the user's environment.plist file and (e.g. if launched via Terminal) those defined in the user's shell get passed to plug-ins. The current nightly build of WebKit does not pass environment variables to plug-ins. This breaks a plug-in that we have. It works fine under Safari, but clearly the environment variables are not being passed when run under the current nightly build of WebKit.
I'm pretty sure that this an artifact of how WebKitLauncher executes Safari. It calls execve and passes in the set of environment variables necessary to launch Safari correctly, and makes no effort to inherit any from the current environment.
It should be possible to test my theory by bypassing the WebKit.app launcher. See the section titled "Testing Your Application With Nightly WebKit" at <http://developer.apple.com/opensource/internet/nightlywebkit.html>, and point it at Safari.app.
Yes, as suggested the problem goes away when running Safari with the WebKit engine. I confirmed this pointing Safari to the WebKit frameworks and then going to a website that is rendered differently for Safari and WebKit to verify that I am running WebKit. After confirming that I was running WebKit, I setup my environment variables and my plug-in received them correctly. So, I accept the suggested theory from Mark Rowe that the issue is simply an artifact of the WebKitLauncher. Thank you for the suggestion.
Mass closing plug-in bugs, as plug-in support has been removed from WebKit. Please comment and/or reopen if this still affects WebKit in some way.