From b51d9188812bea44d01690da3683819f059cfdf9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adolfo=20G=C3=B3mez?= Date: Sat, 20 Apr 2013 03:46:03 +0000 Subject: [PATCH] * Added new "Security" setting, so we can set up trusted sources for requests. * Secured access from Tunneler to Broker. Now pam & html5 requests can only be done from trusted sources. (They will not work only from trusted hosts) * Upgraded jars for transports to fix Mac NX functionallity --- server/src/uds/core/auths/auth.py | 32 ++++++++++++++---- server/src/uds/core/util/Config.py | 17 ++++++---- server/src/uds/dispatchers/guacamole/views.py | 20 ++--------- server/src/uds/dispatchers/pam/views.py | 2 ++ .../src/uds/locale/de/LC_MESSAGES/django.mo | Bin 24638 -> 25436 bytes .../src/uds/locale/es/LC_MESSAGES/django.mo | Bin 27347 -> 28087 bytes .../src/uds/locale/fr/LC_MESSAGES/django.mo | Bin 24902 -> 25700 bytes .../src/uds/transports/HTML5RDP/HTML5RDP.py | 11 ++---- server/src/uds/transports/NX/NXTransport.py | 2 +- .../uds/transports/NX/applet/nxtransport.jar | Bin 27097 -> 27243 bytes server/src/uds/transports/NX/web.py | 13 +++++-- .../transports/TSNX/applet/nxtuntransport.jar | Bin 29731 -> 29797 bytes server/src/uds/xmlrpc/tools/Config.py | 7 ++-- 13 files changed, 59 insertions(+), 45 deletions(-) diff --git a/server/src/uds/core/auths/auth.py b/server/src/uds/core/auths/auth.py index 4d60bcc8..7d16f73b 100644 --- a/server/src/uds/core/auths/auth.py +++ b/server/src/uds/core/auths/auth.py @@ -36,7 +36,7 @@ Provides useful functions for authenticating, used by web interface. from __future__ import unicode_literals from functools import wraps -from django.http import HttpResponseRedirect +from django.http import HttpResponseRedirect, HttpResponseForbidden from uds.core.util.Config import GlobalConfig from uds.core.util import log from uds.core import auths @@ -53,24 +53,25 @@ authLogger = logging.getLogger('authLog') USER_KEY = 'uk' PASS_KEY = 'pk' -def getIp(request): +def getIp(request, translateProxy = True): ''' Obtains the IP of a Django Request, even behind a proxy Returns the obtained IP, that is always be a valid ip address. ''' try: + if translateProxy is False: + raise KeyError() # Do not allow HTTP_X_FORWARDED_FOR request.ip = request.META['HTTP_X_FORWARDED_FOR'].split(",")[0] except KeyError: request.ip = request.META['REMOTE_ADDR'] return request.ip -# Decorator to make easier protect pages +# Decorator to make easier protect pages that needs to be logged in def webLoginRequired(view_func): ''' - Decorator to set protection to acces page - To use this decorator, the view must receive 'response' and 'user' - example: view(response, user) + Decorator to set protection to access page + Look for samples at uds.core.web.views ''' @wraps(view_func) def _wrapped_view(request, *args, **kwargs): @@ -96,6 +97,25 @@ def webLoginRequired(view_func): return view_func(request, *args, **kwargs) return _wrapped_view +# Decorator to protect pages that needs to be accessed from "trusted sites" +def trustedSourceRequired(view_func): + ''' + Decorator to set protection to access page + look for sample at uds.dispatchers.pam + ''' + @wraps(view_func) + def _wrapped_view(request, *args, **kwargs): + ''' + Wrapped function for decorator + ''' + from uds.core.util import net + getIp(request, False) + if net.ipInNetwork(request.ip, GlobalConfig.TRUSTED_SOURCES.get(True)) is False: + return HttpResponseForbidden() + return view_func(request, *args, **kwargs) + return _wrapped_view + + def __registerUser(authenticator, authInstance, username): ''' Check if this user already exists on database with this authenticator, if don't, create it with defaults diff --git a/server/src/uds/core/util/Config.py b/server/src/uds/core/util/Config.py index 9fd9f9b8..9f95cd81 100644 --- a/server/src/uds/core/util/Config.py +++ b/server/src/uds/core/util/Config.py @@ -39,7 +39,7 @@ import logging logger = logging.getLogger(__name__) GLOBAL_SECTION = 'UDS' - +SECURITY_SECTION = 'Security' class Config(object): ''' @@ -230,16 +230,21 @@ class GlobalConfig(object): # If disallow login using /login url, and must go to an authenticator DISALLOW_GLOBAL_LOGIN = Config.section(GLOBAL_SECTION).value('disallowGlobalLogin', '0') + # Allowed "trusted sources" for request + TRUSTED_SOURCES = Config.section(SECURITY_SECTION).value('Trusted Hosts', '*') + initDone = False @staticmethod def initialize(): try: - # All configurations are upper case - # Tries to initialize database data for global config so it is stored asap and get cached for use - for v in GlobalConfig.__dict__.itervalues(): - if type(v) is Config._Value: - v.get() + if GlobalConfig.initDone is False: + # All configurations are upper case + # Tries to initialize database data for global config so it is stored asap and get cached for use + for v in GlobalConfig.__dict__.itervalues(): + if type(v) is Config._Value: + v.get() + GlobalConfig.initDone = True except: logger.debug('Config table do not exists!!!, maybe we are installing? :-)') diff --git a/server/src/uds/dispatchers/guacamole/views.py b/server/src/uds/dispatchers/guacamole/views.py index ae0beeea..7c7d88ae 100644 --- a/server/src/uds/dispatchers/guacamole/views.py +++ b/server/src/uds/dispatchers/guacamole/views.py @@ -36,7 +36,7 @@ from __future__ import unicode_literals from django.http import HttpResponse from uds.core.util.Cache import Cache from uds.core.util import net -from uds.core.auths.auth import getIp +from uds.core.auths import auth import logging logger = logging.getLogger(__name__) @@ -49,6 +49,7 @@ CONTENT_TYPE = 'text/plain' def dict2resp(dct): return '\r'.join(( k + '\t' + v for k, v in dct.iteritems())) +@auth.trustedSourceRequired def guacamole(request, tunnelId): logger.debug('Received credentials request for tunnel id {0}'.format(tunnelId)) @@ -57,23 +58,6 @@ def guacamole(request, tunnelId): val = cache.get(tunnelId, None) - logger.debug('Value of cache element: {0}'.format(val)) - - # Add request source ip to request object - getIp(request) - - # Ensure request for credentials are allowed - allowFrom = val['allow-from'].replace(' ', '') - # and remove allow-from from parameters - del val['allow-from'] - - logger.debug('Checking validity of ip in network(s) {1}'.format(request.ip, allowFrom)) - - if net.ipInNetwork(request.ip, allowFrom) is False: - logger.error('Ip {0} not allowed (not in range {1})'.format(request.ip, allowFrom)) - raise Exception() # Ip not allowed - - # Remove key from cache, just 1 use # Cache has a limit lifetime, so we will allow to "reload" the page # cache.remove(tunnelId) diff --git a/server/src/uds/dispatchers/pam/views.py b/server/src/uds/dispatchers/pam/views.py index ffa239a5..6c286726 100644 --- a/server/src/uds/dispatchers/pam/views.py +++ b/server/src/uds/dispatchers/pam/views.py @@ -33,12 +33,14 @@ from django.http import HttpResponseNotAllowed, HttpResponse from uds.core.util.Cache import Cache +from uds.core.auths import auth import logging logger = logging.getLogger(__name__) # We will use the cache to "hold" the tickets valid for users +@auth.trustedSourceRequired def pam(request): response = '' cache = Cache('pam') diff --git a/server/src/uds/locale/de/LC_MESSAGES/django.mo b/server/src/uds/locale/de/LC_MESSAGES/django.mo index 1e47de1894ef9ef94f5825ed2d8958c6c96c1bb8..b2e210c3bb20813e072d6c1bc611d2a26e46aef0 100644 GIT binary patch delta 6566 zcmX}w3!IJB8prW97lSbu#$|-zt;TK4U`AnF!dzU^h#?YTn|a5~7<;q#9@n&sk}gt7 zrORnZkrZRfIhBfBN`;e3Np&zB=|WDWL`T2>e&1<*Jo8=a-S2+aTF+YRo%wisd&F0J zB0}FJMXxlJ#u3J}!KWJ-<5Rtft{U@23uEfzVb^1>r!j`>=P(|Bcdy4J8!kujPcEsePj`ymf93$O!L z;nnya4#DqH&+Bo8bKf9LpEGN%MK^56=C~iD@dRpMr!f)FqcRcG$`}h1upM?o z4d6!Xi9zgzFJWt}MLqX2YQW98$e7F+N&jXBl`C-xa*tW>ws)ewa1u4MRMzKO9F947 zCn^)Wup#b4W$bh8g5P2~HeHij~(_^HI=T1>-D*dM<{t!2x$&cFtv zX6iwGz65h|7wW+cNC#grsc2!2YZ0oSyHJ_jij2+dX-EFmaV-}#!ZYrT=TV!dljY2; z8#bbyjoM84uES9o7=`-$7E}i%sQYH4mi9K(_4`owJ&9V97p#y|*~SIka1gcj$FVP- zLN8v;`b6R*7=VF8qCI)Y;k?R5c}bScpZL-IT*_h9ghVeDx;{ZL#6Zr z&cj~hS?y}n1J2?EOmFWTqot^hA4i?kDpUtsP^mqKnqdMPrzxglGwh8wVgW{C=ou=* zsZ^oP=MSjOaS`=^1|6M_+M;IM5w+QRBPY@1;AFf7^YINFiKde=-C-1_;3AxeRhWx^ z;s~ApL7kmr^bqP;Y(_n3FRH^tcBIzKa!p6=>fRWQHrB^-tcQM##kr`=EJjUeC2B9M z!C2gk{psJlNktu8K;2lci?f@Pkd1A+A|IIoWK3o*Ho`Ti484N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kUOxQf$zjQvuqojc7c$)O|mfUSV-j+oN;+_8wD11SB z5nrM=m5x@VKM5fVNo}&7JWE;<9jD12GJ(`2uaZ2XBZ0g^&XK>6Uq}kbPu0nM#Vu zQ)DdB@fqnq*<0kjjBk;{B#RW1vZG^J0sGkU4|t4hwC7I}>^WYwqL1fR)TMHs>v6t5 zp7{yu{5}2a3=Q^_reyhg;?s5pgrqe}Nsmv-XqA%DASKmvGh?u?XJG5_V9)GMaXy|I YT`~ea=en1#==nPLsITYhkST$`0=w0A{r~^~ diff --git a/server/src/uds/locale/es/LC_MESSAGES/django.mo b/server/src/uds/locale/es/LC_MESSAGES/django.mo index 9e223051918ac5cdbaf12fe6857efa5c30bdcd75..b0c7a3e320ce3013b16e6c73a213493676dc4181 100644 GIT binary patch delta 7110 zcmY+|30##`8prX&zKNK)AtJBh0tzZ_q~a2&shGQ!TY7kbY+%dTlzQmP|!@Czz%rEHL^2lr=EsP%8YdDvvCCV<)|6& z#6frh3$O#dD?@XT)ikB3OjcuW3}QAujzNw5Fa?e16VwcU!CZ`UjETo#*bB$va9n~p zxD7S1k5Dr`hdQ6es0(op>bV=SFYZLWV25e`mutwjxB9V*4IAz3ts zPy_lNHSi0l>!Mh2ZN@wtjU!MqzX21l0ksM5bKQu_(3Xs#z2He2)X@(2g8isHaKLRp zj(X77s6FwsYb&O$`+8s`4o2;vVOWhzF&s}}1b%^<`B$g`GzBS?Qi$o!tAv%P2Rw@T zcmlQ7=`3^sUW2o66HdkRsFYvP)0k`Vc2qqo)81c*bEvOGy?)0q8qZ)X2EV6p35D~h zjuLrClT|5*v-`!qp0U$JPt=?Y8gZ_2Shu1C#eFY3n6kt~}C(xDD=P$?dQ%HU+=g)j?| zZDnplb-WFA{T|d(yoV`x6oX9KoOMrR@Gh~jO*U#KQ&5|54Qj35K-SE>jg#;&YBTm^ zw3BfaPQ!O`9CjOE_e2${*!h5@X<)^s}!n&}~ALz}axfpi*ZFC2whn%StC z%ty_v0=351qpp7dd11`UsEn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ztYFvaNVjsl22%9T*R$K{az-#^Z$@ami;yWAGh^DI#>CZgZT+v_S#_T(YF3N z_5H+9BA3wapGov5G6wC+Du;;|h}(!6#5zKI zy{6%j-V@fA@^^dRbp zw~1E>mHUWKy*20G`Z>0K3|r8__qdGkB}$2phzE(k65kM;h-b9^o2lF^HB{1XHZX{I z-?oQfLmvDDrrK-GaXrzT>*0h-xr6tGbtm;Fi8aJg;$dPfaf1lqet#eGumAI{@*eRh zp;zNyh%1E3c?a)jHlJsS3&a@W5TWt~F^_0V>>wT>o+4f%+7VHNN=y3s%&B@m2hqQ` z1oOo|Y+aNPmxyTM3~`G1jZm3RR1itTXrh>Sk?27DlNdq#mw1SXCw3CE36&K@0DY-U zCcOO*pz;9`OsM=!JngMHe-Z1cZy+`jAKUAzF_Z_L#7Mjw8{>SuMm$FhBUEB-hi_63 z^ef*rD-vRQ?$5;RW diff --git a/server/src/uds/locale/fr/LC_MESSAGES/django.mo b/server/src/uds/locale/fr/LC_MESSAGES/django.mo index b4e5bdbad9ee4d083c37288209aa55b8832883cd..5a5577374b94504366cfadbaca9ae88fe461e8d6 100644 GIT binary patch delta 6594 zcmYk=30xLs0>|+O0YOAiM7%;q!y6RvLeWyd`$$pqEJYX&h4*#e_r)`N%gnT`w9L#h zGdC@3%j50Pva&qNF1xlYT`R3sJ3Ml8bJKNy|96IV=i{I6GxN?n&poII-ir9{orvJE zq^Q+~qhW+G*WkKXW4tOi(p6&)rx+81U%GzldK&9;{X90n-`wkUn;MhJc>?P5z8H-K zn1DmE4Nk;#V}fQOg?KJ(aBp}H^}yZO5Z`srkKj=25>{LP0m|!6x`2M&Wm;hMmSlyoef!x-E>cFaguBE2;rE zU{4HSFMJkT;tAAquc8{I>hadX~=o^uXbmkGG>n zVjtGS4^Sia1$M?$n1RW3R}CM4Jjx73bmoi_^aX*Tu=+oxHn!zEuIdR)3dHv zpYz_R#Wc`$IBEpOpgy0Bs-O&Y-yGD`-h#S*H|oAeP*bwm3Oa?|T+j`lp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7lPam?2FV~Q1Id5MHS#yIjr^VbK>CoDWHCu3^NBZk zOr9gP$YoNWEF~({7N(VYGk`>rKaziwGvs&VN!dtcEcu@FBeA3bnM-~oUlEmaDCo4!#Qc6_5Bn4AlRb$@9Kais&la!GsrQ4GV=G*mu;YqT?K7JZs=jS1H z-JCZ=FVu2g3wL*OE^WTm(^=56(AQZRpXu(5NZRM+mlPYH5)q%87N6QCKEYX&TI}u| umVVvGIktO>n{!H!%U;e&xx4B*Q-;*_@Xi?@F(sm8*@-Tp&e??*y?+9wRe9n7 diff --git a/server/src/uds/transports/HTML5RDP/HTML5RDP.py b/server/src/uds/transports/HTML5RDP/HTML5RDP.py index 0defb893..4dd2fd0f 100644 --- a/server/src/uds/transports/HTML5RDP/HTML5RDP.py +++ b/server/src/uds/transports/HTML5RDP/HTML5RDP.py @@ -57,9 +57,7 @@ class HTML5RDPTransport(Transport): iconFile = 'rdp.png' needsJava = False # If this transport needs java for rendering - guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/https & port if needed)'), defvalue = 'https://', length = 64) - allowRequestsFrom = gui.TextField(label=_('Allowed hosts'), order = 1, tooltip = _('Hosts allowed to ask for credentials for users (use * for all host, but not recommended). Comma separated list'), - defvalue = '*', length = 256) + guacamoleServer = gui.TextField(label=_('Tunnel Server'), order = 1, tooltip = _('Host of the tunnel server (use http/https & port if needed) as accesible from users'), defvalue = 'https://', length = 64) useEmptyCreds = gui.CheckBoxField(label = _('Empty creds'), order = 2, tooltip = _('If checked, the credentials used to connect will be emtpy')) fixedName = gui.TextField(label=_('Username'), order = 3, tooltip = _('If not empty, this username will be always used as credential')) fixedPassword = gui.PasswordField(label=_('Password'), order = 4, tooltip = _('If not empty, this password will be always used as credential')) @@ -68,13 +66,8 @@ class HTML5RDPTransport(Transport): def initialize(self, values): if values is None: return - a = '' if self.guacamoleServer.value[0:4] != 'http': raise Transport.ValidationException(_('The server must be http or https')) - try: - net.networksFromString(self.allowRequestsFrom.value) - except Exception as e: - raise Transport.ValidationException(_('Invalid network: {0}').format(str(e))) # Same check as normal RDP transport def isAvailableFor(self, ip): @@ -124,7 +117,7 @@ class HTML5RDPTransport(Transport): username = username + '@' + username # Build params dict - params = { 'protocol':'rdp', 'hostname':ip, 'username': username, 'password': password, 'allow-from': self.allowRequestsFrom.value } + params = { 'protocol':'rdp', 'hostname':ip, 'username': username, 'password': password } logger.debug('RDP Params: {0}'.format(params)) diff --git a/server/src/uds/transports/NX/NXTransport.py b/server/src/uds/transports/NX/NXTransport.py index d086405b..6f2e34b1 100644 --- a/server/src/uds/transports/NX/NXTransport.py +++ b/server/src/uds/transports/NX/NXTransport.py @@ -175,7 +175,7 @@ class NXTransport(Transport): # Fix username/password acording to os manager username, password = userService.processUserPassword(username, password) - return generateHtmlForNX(self, idUserService, idTransport, ip, username, password, extra) + return generateHtmlForNX(self, idUserService, idTransport, ip, os, username, password, extra) def getHtmlComponent(self, theId, os, componentId): # We use helper to keep this clean diff --git a/server/src/uds/transports/NX/applet/nxtransport.jar b/server/src/uds/transports/NX/applet/nxtransport.jar index 8d3496acb7cd0a55a22e312d402877883c522077..f8261e35e074908c226d5a61a719f4f469f63571 100644 GIT binary patch delta 4576 zcmZ8lbySqw*B(kjTDm1A1*Jzw)rtTP*?kJm?*mhZ6h3K~rnWCZ)0x1mLIgv8x@Z=biEwUN1CE zC}_mkNuLh|$M~O8hJ5?ABr~aPKq%3=L35C>;fKK2yyCH)aCsg+-HyX8YgW}~=e)$< z%JZQNk8XTTGqSbQvu%^lL1Z2?>laJ$APkk!pJ9y)Ewr18D@65}RZ80z>(?XsKh;0}p5#$x%5r8u2@%LgW4_?VsU<^Txbji0S@pn^NkMhGd}@26k2-^Sd51z1A2$g+ z(x#Pb1ok|A=>ic4wdZK6O6VAS)nv-MNC1EqDgba-4Uhj-4iHgfMz8`TMS=*hbg3~2 zUg8ePiZ=3*&l4xSuIx1k-Xe5Z;~K$Yq4CBYr4aFECgg)GP$1O zS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 zqPM9_sp=BFBn2ps9^}=Np*skhahPv~`lOZhScyg5bf8wPP-e8T31T$uRDT%VF-)Hx zR@;MgFl*aAM)@dLt-eK`D>3AB%gcHX~dx;dT;L4LW|!PA}wof+T)*dOHft zH+zabs8?)Z$F64|Gk#n>F@6{W$c66Hy?z6okrEb{f%EA0y^;o) z$^@bf2M&OD4tJ;)H-$SDW2hsV8+UK#t+&12^VYyi*=2DIMN9K8`+N20DprrfQ&*h^ z2v4OW<;6!e$6G-E=Y@^-+{WOb&bzv3s%rF`$}!{KCxLBME9=q-@6~l*Dluu9&Iido z@n&S2V8{0n11qgcZR8|KPK_G?X{~rXaoFq{sFqG9f&`sT0`!CS7 zX>^$DWeqqCm!3^y(Ns1ad|KfzbS`zyTO+&w0tSVDY(+m<}A$rUF0NGhLD` zcyg{Svt4TZ4lIA_>p9RvhxsnFBseJ;??B9Y0la_jE8D+baSFfm4>>UW@$a1bdnL{_ zYA{~%DhNjrUv4@mhoXl{-MP$lMp3g~^gS%fIXy)Hfjl|y`{uujvT2_ua)3Q3;>$!K n%j;ddWDtnqc^1#V5;YOvPXr&x;>Zi_LxP%)^!R+X7YY9X!{zSW diff --git a/server/src/uds/transports/NX/web.py b/server/src/uds/transports/NX/web.py index 790a43e6..1dfe3147 100644 --- a/server/src/uds/transports/NX/web.py +++ b/server/src/uds/transports/NX/web.py @@ -33,6 +33,7 @@ from django.utils.translation import ugettext as _ from django.core.urlresolvers import reverse +from uds.core.util import OsDetector import logging, os, sys logger = logging.getLogger(__name__) @@ -53,7 +54,8 @@ def simpleScrambler(data): -def generateHtmlForNX(transport, idUserService, idTransport, ip, user, password, extra): +def generateHtmlForNX(transport, idUserService, idTransport, ip, os, user, password, extra): + isMac = os['OS'] == OsDetector.Macintosh applet = reverse('uds.web.views.transcomp', kwargs = { 'idTransport' : idTransport, 'componentId' : '1' }) # Gets the codebase, simply remove last char from applet codebase = applet[:-1] @@ -71,9 +73,14 @@ def generateHtmlForNX(transport, idUserService, idTransport, ip, user, password, 'height:' + str(extra['height']), 'is:' + idUserService ])) + if isMac is True: + msg = '

' + _('In order to use this transport, you need to install first OpenNX Client for mac') + '

' + msg += '

' + _('You can oibtain it from ') + '' + _('OpenNx Website') + '

' + else: + msg = '

' + _('In order to use this transport, you need to install first Nomachine Nx Client version 3.5.x') + '

' + msg +='

' + _('you can obtain it for your platform from') + '' + _('nochamine web site') + '

' res = '
' % (codebase, '1', data ) - res += '

' + _('In order to use this transport, you need to install first Nomachine Nx Client version 3.5.x') + '

' - res += '

' + _('you can obtain it for your platform from') + '' + _('nochamine web site') + '

' + res += '
' + msg + '
' return res diff --git a/server/src/uds/transports/TSNX/applet/nxtuntransport.jar b/server/src/uds/transports/TSNX/applet/nxtuntransport.jar index 88300eff1abd985bff9912a52c395b028063cc29..918ac3522104c8fc39cc6f4964c71478bb6bde0a 100644 GIT binary patch delta 5132 zcmZWtbyQVb_r3I`TRI=z-Q7sT^#&y&-Ec+HtN3W7E{HUWbaUyJ?hZkakW?Be0r}zM z`^NBnzrFvNbB=Y^SZnNk&Ny@BZli5%qtO}aU|>=JfOk8TFG&UP$D%+gdQc%kr-owR zD^Xyt1asaH3D`R{p>42ov;s(bumvOD?;8$QFTBqwZkRVvd}5!NsteqA_G!C5&88P* z-Ny6#RfiLkn-mi`*?jS{8jBSBs38S~-qP06#+Qp36Zit3-Nv7ERR`Xy#9Uh`SNhjz zNm9=N)nZH9L?cTp3@EYP;1GxqGa7u&^yIId=W?Os_Sx6!Wy!opUn`nRUxi@uvC8Sd z+@H{3UlJEl)@*{5+zX2gD?Z@ZS!0Rzh=n$yE6TijAl+H^p5$vn#7;1krt0>BjeJIs zLCvr>#V>Hx1FIbOKhoieY4PD~E(ys&_xFToAP6eZ#Y7(|YM&VG(v#g*87*2g z#b>{K1s3YJFv<%3Jpc4!ql~-A!n(4ipK4iQK4}C1m26s~z=xJd?xhp#6K>hCj%Wsd z^QhL$(e_o;8)!YsaAR<4gUpQcffo zqjnd2{(ONJPZETrCX=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xm!Dh{i>O<9aAZc2Gzl~-Yq{9tu+Hj%te{a^h=W6Nr3ltht4eB0q$u6 zcV(4!dAjT=V><0`2Nad7+z=y_eev?49JrEfn_7Mpw$Vyn0WMNWdw#}iaqVFD(?mp# z?X&8Lax3|#Oxq+<(N5)>Y?yW?54P!!-3bvZRYCg2_-t;AY>RB=2FE)d13ab6=gvz% z#$#kG4x-UH6Or=^q;valaj59$IuIgp^$7YzUw1=^`dqR3^~$pUR>Bdz(hDb%^Vk-} z#i)^CI+fj#YamMBqrYn!cU|-WB#ErA9RU>UAsCD7Kc67)-R4+J_GMJ#8*! zvUI2X?bE|IGzK{tDJ|F`P8>)s;?aBNodZncc3UkF9AkgC>wxEg7{~tH95GJBNU$=} zIQh!I&Ao$?dbcTfyD_cXS)gmQ%bfVR@nQ))q()>;K%6zE&P8$?dCQY~?xr4{%ja*@ z;2|?<&gfj}!x)5eIY!<@plx_bEBw>xOrWifcrBEU9tX;`rPJpS|NcsQVZ27_1)F8@ z711%O*OiSp9rFpAUSUD%W838D9k%x=kK=fIt0m5A>Ghw#wbn@ns?_Zle$&1yj0?Gj zEElt#0C@ip_-Z9KV47U+TJmF1r6_1JtqYC@#)lp8v8A{a>C# z5-bUti}M$nzqQFEloZ-`YJ1Dy*<4#UK5aCj_W@{kQJ!$@WK!ztBA8 zE;N22gfBU3=0JInH@vkdD)UVe60OzbLA^-pY diff --git a/server/src/uds/xmlrpc/tools/Config.py b/server/src/uds/xmlrpc/tools/Config.py index 315bb4fb..9d6843ca 100644 --- a/server/src/uds/xmlrpc/tools/Config.py +++ b/server/src/uds/xmlrpc/tools/Config.py @@ -32,7 +32,7 @@ ''' from ..auths.AdminAuth import needs_credentials -from uds.core.util.Config import Config +from uds.core.util.Config import Config, GLOBAL_SECTION, SECURITY_SECTION import logging @@ -42,7 +42,10 @@ logger = logging.getLogger(__name__) def getConfiguration(credentials): res = [] addCrypt = credentials.isAdmin - for cfg in Config.enumerate(): + + priorities = { GLOBAL_SECTION: 0, SECURITY_SECTION: 1 } + + for cfg in (v[0] for v in sorted([(x, priorities.get(x.section(), 20)) for x in Config.enumerate()], key = lambda c:c[1])): if cfg.isCrypted() is True and addCrypt is False: continue res.append( {'section': cfg.section(), 'key' : cfg.key(), 'value' : cfg.get(), 'crypt': cfg.isCrypted(), 'longText': cfg.isLongText() } )