forked from shaba/openuds
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
6addbe261b | ||
|
f53b8fee61 | ||
|
5047225ea0 | ||
|
44da266276 | ||
|
a7b5b85c05 |
165
.gitignore
vendored
Normal file
165
.gitignore
vendored
Normal file
@ -0,0 +1,165 @@
|
||||
*.pyc
|
||||
|
||||
# Debian buildings
|
||||
*.debhelper*
|
||||
*-stamp
|
||||
*.substvars
|
||||
|
||||
nxtransport/bin/
|
||||
nxtuntransport/bin/
|
||||
rdptransport/java/bin/
|
||||
server/src/log/
|
||||
ssh-tunnel/tunnelLaucher/bin/
|
||||
|
||||
|
||||
# /client/administration/
|
||||
/client/administration/*.suo
|
||||
|
||||
# /client/administration/UdsAdmin/
|
||||
/client/administration/UdsAdmin/*.user
|
||||
|
||||
# /client/administration/UdsAdmin/bin/
|
||||
/client/administration/UdsAdmin/bin/Debug
|
||||
/client/administration/UdsAdmin/bin/Release
|
||||
|
||||
# /client/administration/UdsAdmin/obj/x86/
|
||||
/client/administration/UdsAdmin/obj/x86/Debug
|
||||
/client/administration/UdsAdmin/obj/x86/Release
|
||||
|
||||
# /client/administration/installer/UDSAdminInstaller/
|
||||
/client/administration/installer/UDSAdminInstaller/MSChart.exe
|
||||
/client/administration/installer/UDSAdminInstaller/UDSAdminSetup.exe
|
||||
|
||||
# /guacamole-tunnel/
|
||||
/guacamole-tunnel/target
|
||||
|
||||
# /linuxActor/
|
||||
/linuxActor/udsactor_*
|
||||
|
||||
# /linuxActor/src/debian/
|
||||
/linuxActor/src/debian/udsactor
|
||||
|
||||
# /linuxActorNX/
|
||||
/linuxActorNX/udsactor-nx_*
|
||||
|
||||
# /linuxActorNX/src/debian/
|
||||
/linuxActorNX/src/debian/udsactor-nx
|
||||
|
||||
# /linuxActorXRDP/
|
||||
/linuxActorXRDP/udsactor-xrdp_*
|
||||
|
||||
# /linuxActorXRDP/src/debian/
|
||||
/linuxActorXRDP/src/debian/udsactor-xrdp
|
||||
|
||||
# /nxtransport/jar/
|
||||
/nxtransport/jar/*.sh
|
||||
/nxtransport/jar/*.jar
|
||||
|
||||
# /nxtuntransport/jar/
|
||||
/nxtuntransport/jar/*.sh
|
||||
/nxtuntransport/jar/*.jar
|
||||
|
||||
# /rdptransport/java/jar/
|
||||
/rdptransport/java/jar/*.sh
|
||||
/rdptransport/java/jar/*.jar
|
||||
|
||||
# /server/
|
||||
/server/*_enterprise
|
||||
/server/openuds.sublime-project
|
||||
/server/openuds.sublime-workspace
|
||||
|
||||
# /server/src/
|
||||
/server/src/taskmanager.pid
|
||||
/server/src/testing
|
||||
/server/src/*_enterprise*
|
||||
|
||||
# /server/src/log/
|
||||
/server/src/log/uds.log.*
|
||||
/server/src/log/sql.log.*
|
||||
/server/src/log/*.log.*
|
||||
|
||||
# /server/src/server/
|
||||
/server/src/server/settings.py
|
||||
/server/src/server/*_enterprise.py
|
||||
/server/src/server/enterprise*
|
||||
|
||||
# /server/src/static/
|
||||
/server/src/static/cache
|
||||
|
||||
# /server/src/uds/
|
||||
/server/src/uds/*_enterprise.py
|
||||
/server/src/uds/fixtures
|
||||
/server/src/uds/tests
|
||||
|
||||
# /server/src/uds/auths/
|
||||
/server/src/uds/auths/*-enterprise
|
||||
/server/src/uds/auths/*_enterprise
|
||||
|
||||
# /server/src/uds/core/util/
|
||||
/server/src/uds/core/util/*enterprise.py
|
||||
|
||||
# /server/src/uds/dispatchers/
|
||||
/server/src/uds/dispatchers/*_enterprise
|
||||
|
||||
# /server/src/uds/locale/
|
||||
/server/src/uds/locale/*.sh
|
||||
|
||||
# /server/src/uds/management/commands/
|
||||
/server/src/uds/management/commands/*_enterprise.py
|
||||
|
||||
# /server/src/uds/models/
|
||||
/server/src/uds/models/enterprise*
|
||||
|
||||
# /server/src/uds/plugins/
|
||||
/server/src/uds/plugins/enterprise*
|
||||
|
||||
# /server/src/uds/services/
|
||||
/server/src/uds/services/*-enterprise
|
||||
/server/src/uds/services/*_enterprise
|
||||
|
||||
# /server/src/uds/static/adm/css/
|
||||
/server/src/uds/static/adm/css/admin.min.css
|
||||
|
||||
# /server/src/uds/static/adm/js/
|
||||
/server/src/uds/static/adm/js/admin.min.js
|
||||
|
||||
# /server/src/uds/templates/uds/admin/
|
||||
/server/src/uds/templates/uds/admin/sample.html
|
||||
|
||||
# /server/src/uds/transports/
|
||||
/server/src/uds/transports/*-enterprise
|
||||
|
||||
# /udsService/
|
||||
/udsService/*.suo
|
||||
|
||||
# /udsService/installer/
|
||||
/udsService/installer/UDSActorSetup.exe
|
||||
|
||||
# /udsService/rpc/bin/
|
||||
/udsService/rpc/bin/Debug
|
||||
/udsService/rpc/bin/Release
|
||||
/udsService/rpc/bin/x86
|
||||
|
||||
# /udsService/rpc/obj/
|
||||
/udsService/rpc/obj/Debug
|
||||
/udsService/rpc/obj/Release
|
||||
/udsService/rpc/obj/x86
|
||||
|
||||
# /udsService/udsService/bin/
|
||||
/udsService/udsService/bin/Debug
|
||||
/udsService/udsService/bin/Release
|
||||
/udsService/udsService/bin/x64
|
||||
|
||||
# /udsService/udsService/obj/
|
||||
/udsService/udsService/obj/x64
|
||||
/udsService/udsService/obj/x86
|
||||
|
||||
# /udsService/udsgui/bin/
|
||||
/udsService/udsgui/bin/Debug
|
||||
/udsService/udsgui/bin/Release
|
||||
/udsService/udsgui/bin/x86
|
||||
|
||||
# /udsService/udsgui/obj/
|
||||
/udsService/udsgui/obj/Debug
|
||||
/udsService/udsgui/obj/Release
|
||||
/udsService/udsgui/obj/x86
|
@ -38,6 +38,8 @@ from django.utils.translation import ugettext_noop as _
|
||||
from uds.core.auths import Authenticator
|
||||
from uds.core.auths.GroupsManager import GroupsManager
|
||||
from uds.core.util import net
|
||||
from uds.core.util.request import getRequest
|
||||
|
||||
import logging, random, string
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -73,8 +75,7 @@ class IPAuth(Authenticator):
|
||||
def authenticate(self, username, credentials, groupsManager):
|
||||
# If credentials is a dict, that can't be sent directly from web interface, we allow entering
|
||||
# We use this "trick" so authenticators
|
||||
if self.cache().get(username) == credentials:
|
||||
self.cache().remove(username)
|
||||
if username == getRequest().ip:
|
||||
self.getGroups(username, groupsManager)
|
||||
return True
|
||||
return False
|
||||
@ -97,8 +98,7 @@ class IPAuth(Authenticator):
|
||||
gm = GroupsManager(self.dbAuthenticator())
|
||||
self.getGroups(request.ip, gm)
|
||||
if gm.hasValidGroups() and self.dbAuthenticator().isValidUser(request.ip, True):
|
||||
passw = ''.join(random.choice(string.letters + string.digits) for __ in xrange(12))
|
||||
self.cache().put(request.ip, passw)
|
||||
passw = ''
|
||||
return '<script type="text/javascript">$("#id_user").val("' + request.ip + '");$("#id_password").val("' + passw + '");$("#loginform").submit();</script>'
|
||||
else:
|
||||
return '<div>This ip is not allowed to autologin (' + request.ip +')</div><script type="text/javascript">$("#backToLogin").click()</script>'
|
||||
|
@ -55,7 +55,7 @@ class BaseForm(forms.Form):
|
||||
|
||||
class LoginForm(BaseForm):
|
||||
user = forms.CharField(label=_('Username'), max_length=64)
|
||||
password = forms.CharField(label=_('Password'), widget=forms.PasswordInput({'title': _('Password')}))
|
||||
password = forms.CharField(label=_('Password'), widget=forms.PasswordInput({'title': _('Password')}), required=False)
|
||||
authenticator = forms.ChoiceField(label=_('Authenticator'), choices = ())
|
||||
java = forms.CharField(widget = forms.HiddenInput())
|
||||
standard = forms.CharField(widget = forms.HiddenInput(), required=False)
|
||||
|
Loading…
Reference in New Issue
Block a user