mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-15 05:53:00 +00:00
pop environment variables in subprocess
avoid kernel processes inheriting server security values
This commit is contained in:
@@ -99,8 +99,8 @@ class SingleUserNotebookApp(NotebookApp):
|
||||
s = self.webapp_settings
|
||||
s['token_cache'] = {}
|
||||
s['user'] = self.user
|
||||
s['hub_api_key'] = env.get('IPY_API_TOKEN', '')
|
||||
s['cookie_secret'] = env.get('IPY_COOKIE_SECRET', '')
|
||||
s['hub_api_key'] = env.pop('JPY_API_TOKEN', '')
|
||||
s['cookie_secret'] = env.pop('JPY_COOKIE_SECRET', '')
|
||||
s['cookie_name'] = self.cookie_name
|
||||
s['login_url'] = url_path_join(self.hub_prefix, 'login')
|
||||
s['hub_api_url'] = self.hub_api_url
|
||||
|
@@ -39,7 +39,7 @@ class Spawner(LoggingConfigurable):
|
||||
hub = Any()
|
||||
api_token = Unicode()
|
||||
|
||||
env_prefix = Unicode('IPY_')
|
||||
env_prefix = Unicode('JPY_')
|
||||
def _env_key(self, d, key, value):
|
||||
d['%s%s' % (self.env_prefix, key)] = value
|
||||
|
||||
|
Reference in New Issue
Block a user