Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# This file is part of Xpra. 

2# Copyright (C) 2019 Antoine Martin <antoine@xpra.org> 

3# Xpra is released under the terms of the GNU GPL v2, or, at your option, any 

4# later version. See the file COPYING for details. 

5 

6import os 

7 

8 

9class Handler: 

10 

11 def __init__(self, client, **kwargs): 

12 self.client = client 

13 self.var_name = kwargs.pop("name", "XPRA_PASSWORD") 

14 

15 def __repr__(self): 

16 return "env" 

17 

18 def get_digest(self) -> str: 

19 return None 

20 

21 def handle(self, packet) -> bool: 

22 password = os.environ.get(self.var_name) 

23 if not password: 

24 return False 

25 self.client.send_challenge_reply(packet, password) 

26 return True