Compare commits
11 Commits
ldap-pytho
...
master
Author | SHA1 | Date | |
---|---|---|---|
4f0097ac1b | |||
645edec125 | |||
253c5c2491 | |||
48be235fde | |||
5f3bbd0ff4 | |||
249b0009a3 | |||
5225f72ee0 | |||
de1315db33 | |||
6c2a65221c | |||
407fa6351d | |||
490e9bb80c |
9
.gitignore
vendored
9
.gitignore
vendored
@ -1,11 +1,16 @@
|
||||
/settings.ini
|
||||
/settings.ini.example.original
|
||||
/uwsgi.ini
|
||||
/oharrak.txt
|
||||
/.env
|
||||
session
|
||||
libs/__pycache__
|
||||
__pycache__
|
||||
*.db
|
||||
!.empty
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
session
|
||||
libs/__pycache__
|
||||
!static/tmp
|
||||
static/tmp/*
|
||||
!static/tmp/.gitkeep
|
||||
|
@ -1,6 +1,8 @@
|
||||
FROM python:3-alpine
|
||||
ARG UID_
|
||||
ENV UID_=1000
|
||||
|
||||
ARG USER_=admin
|
||||
ARG UID_=1000
|
||||
|
||||
RUN apk add --no-cache --upgrade bash
|
||||
|
||||
ADD --chown=$UID_:$UID_ . /www
|
||||
@ -16,4 +18,7 @@ RUN set -e; \
|
||||
pip install -r requirements.txt; \
|
||||
apk del .build-deps;
|
||||
|
||||
RUN adduser -S -D $USER_ -u $UID_
|
||||
USER $USER_
|
||||
|
||||
ENTRYPOINT ["./start.sh"]
|
||||
|
@ -52,7 +52,7 @@ Konfiguraketa fitxategia sortu:
|
||||
|
||||
edo
|
||||
|
||||
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID
|
||||
docker build -t aitzol/ldap-webui:latest . --build-arg UID_=$UID --build-arg USER_=$USER
|
||||
|
||||
#### Edukiontzia sortu
|
||||
|
||||
|
55
app.py
55
app.py
@ -21,7 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
import bottle
|
||||
from bottle import get, post, static_file, request, route, template, error
|
||||
from bottle import SimpleTemplate
|
||||
from bottle.ext import beaker
|
||||
#from bottle.ext import beaker
|
||||
from beaker.middleware import SessionMiddleware
|
||||
from configparser import ConfigParser
|
||||
from ldap3 import Server, Connection, ALL
|
||||
from ldap3 import SIMPLE, SUBTREE, MODIFY_REPLACE, MODIFY_ADD, MODIFY_DELETE, ALL_ATTRIBUTES
|
||||
@ -160,12 +161,12 @@ def post_user():
|
||||
#if(check_2fa_step1(form('username'))):
|
||||
if(newSession().get()['secureAuth']):
|
||||
# encrypt and store the credentials
|
||||
sid = newSession().get()['id']
|
||||
key = tools.key()
|
||||
data = ';'.join([form('username'),form('password'),newSession().get()['authCode']])
|
||||
data_enc = cryptocode.encrypt(data, newSession().get()['id'])
|
||||
data_enc = cryptocode.encrypt(data, key)
|
||||
data_to_url = base64.urlsafe_b64encode(str.encode(data_enc))
|
||||
memo.get(data_enc)
|
||||
memo.sid=sid
|
||||
memo.data = data_enc
|
||||
memo.key = key
|
||||
logout(form('username'))
|
||||
return index_tpl(two_factor_authentication=True, path=data_to_url, str=i18n.str)
|
||||
except Error as e:
|
||||
@ -185,7 +186,7 @@ def post_user_step2(path):
|
||||
try:
|
||||
# decrypt url
|
||||
path = base64.urlsafe_b64decode(path)
|
||||
path = cryptocode.decrypt(path.decode('utf-8'), memo.sid)
|
||||
path = cryptocode.decrypt(path.decode('utf-8'), memo.key)
|
||||
data = path.split(';')
|
||||
|
||||
username = data[0]
|
||||
@ -230,7 +231,11 @@ def post_signup():
|
||||
def error(msg):
|
||||
return signup_tpl(alerts=[('error', msg, 'fadeOut')], str=i18n.str)
|
||||
|
||||
if not tools.code_is_valid(form('invite_code'), db):
|
||||
try:
|
||||
if not tools.code_is_valid(form('invite_code'), db):
|
||||
return(error(i18n.msg[6]))
|
||||
except Exception as e:
|
||||
LOG.error(e)
|
||||
return(error(i18n.msg[6]))
|
||||
|
||||
if len(form('username')) < 3:
|
||||
@ -433,11 +438,11 @@ def post_delete():
|
||||
def serve_static(filename):
|
||||
return static_file(filename, root=path.join(BASE_DIR, 'static'))
|
||||
|
||||
@get("/static/fonts/<filepath:re:.*\.(eot|otf|svg|ttf|woff|woff2?)>")
|
||||
@get("/static/fonts/<filepath:re:.*\\.(eot|otf|svg|ttf|woff|woff2?)>")
|
||||
def font(filepath):
|
||||
return static_file(filepath, root="static/fonts")
|
||||
|
||||
@get("/static/tmp/<filepath:re:.*\.(png|svg)>")
|
||||
@get("/static/tmp/<filepath:re:.*\\.(png|svg)>")
|
||||
def font(filepath):
|
||||
return static_file(filepath, root="static/tmp")
|
||||
|
||||
@ -527,7 +532,6 @@ def login_user_ldap(conf, username, password):
|
||||
c.bind()
|
||||
if is_trusted_device(conf, user_dn):
|
||||
newSession().set(get_user_data(user_dn, c))
|
||||
newSession().data['id'] = tools.session_id()
|
||||
#update timestamp + ip address
|
||||
update_login_info(conf, user_dn)
|
||||
LOG.debug("%s logged in to %s" % (username, conf['base']))
|
||||
@ -652,7 +656,8 @@ def register(conf, username, firstname, surname, password, email, isFake, device
|
||||
firstname, 'sn': surname, 'uid' : username, 'mail': email, 'active': False, 'fakeCn': isFake,
|
||||
'devices':device, 'ip':request.environ.get('HTTP_X_REAL_IP', request.remote_addr), 'lastLogin': ts,
|
||||
'secureAuth': False}
|
||||
new_user_dn = "cn="+firstname+" "+surname+" - "+username+",cn=users,"+conf['base']
|
||||
#new_user_dn = "cn="+firstname+" "+surname+" - "+username+",cn=users,"+conf['base']
|
||||
new_user_dn = "cn="+firstname+" "+surname+",cn=users,"+conf['base']
|
||||
c.add(dn=new_user_dn,object_class=OBJECT_CLASS, attributes=attributes)
|
||||
#create/change user password
|
||||
c.extend.standard.modify_password(new_user_dn, '', password)
|
||||
@ -1023,11 +1028,17 @@ def get_user_data(user_dn, conn):
|
||||
data.append(conn.entries[0].uid.values[0])
|
||||
data.append(conn.entries[0].mail.values[0])
|
||||
data.append(conn.entries[0].devices.values)
|
||||
data.append(conn.entries[0].ip.values[0])
|
||||
if(conn.entries[0].ip):
|
||||
data.append(conn.entries[0].ip.values[0])
|
||||
else:
|
||||
data.append(request.environ.get('HTTP_X_REAL_IP', request.remote_addr))
|
||||
#ts = conn.entries[0].lastLogin.values[0]
|
||||
#ts = datetime.strptime(ts, '%Y-%m-%d %H:%M:%S%z')
|
||||
#ts = datetime.strftime(t, '%Y-%m-%d %H:%M:%S')
|
||||
data.append(str(conn.entries[0].lastLogin.values[0])[:-6])
|
||||
if(conn.entries[0].lastLogin):
|
||||
data.append(str(conn.entries[0].lastLogin.values[0])[:-6])
|
||||
else:
|
||||
data.append(datetime.now().strftime('%Y-%m-%d %H:%M:%S'))
|
||||
data.append(conn.entries[0].secureAuth.values[0])
|
||||
if(conn.entries[0].authCode):
|
||||
data.append(conn.entries[0].authCode.values[0])
|
||||
@ -1070,14 +1081,6 @@ def is_trusted_device(conf, user_dn):
|
||||
if not find_device(user_dn, c, d):
|
||||
OBJECT_CLASS = ['top', 'inetOrgPerson', 'posixAccount', 'accountsManagement']
|
||||
c.modify(user_dn, {'devices': [( MODIFY_ADD, d )] })
|
||||
'''
|
||||
if find_device(user_dn, c, 'unknown'):
|
||||
OBJECT_CLASS = ['top', 'inetOrgPerson', 'posixAccount', 'accountsManagement']
|
||||
c.modify(user_dn, {'devices': [( MODIFY_REPLACE, d )] })
|
||||
else:
|
||||
OBJECT_CLASS = ['top', 'inetOrgPerson', 'posixAccount', 'accountsManagement']
|
||||
c.modify(user_dn, {'devices': [( MODIFY_ADD, d )] })
|
||||
'''
|
||||
c.unbind()
|
||||
return True
|
||||
except Exception as e:
|
||||
@ -1099,9 +1102,7 @@ class Error(Exception):
|
||||
class tMemory(object):
|
||||
def __init__(self):
|
||||
self.data = None
|
||||
self.sid = None
|
||||
def get(self, data):
|
||||
self.data = data
|
||||
self.key = None
|
||||
|
||||
memo = tMemory()
|
||||
|
||||
@ -1113,6 +1114,7 @@ def newSession():
|
||||
def __init__(self):
|
||||
super(Session, self).__init__()
|
||||
self.data = bottle.request.environ.get('beaker.session')
|
||||
self.sid = self.data.id
|
||||
#localization
|
||||
self.lang = self.get_lang()
|
||||
global i18n
|
||||
@ -1159,6 +1161,8 @@ def newSession():
|
||||
self.data['secureAuth'] = self.secureAuth
|
||||
self.data['authCode'] = self.authCode
|
||||
|
||||
self.data['id'] = self.sid
|
||||
|
||||
def close(self):
|
||||
self.data.pop('username')
|
||||
|
||||
@ -1195,7 +1199,8 @@ class SuperUsers(object):
|
||||
|
||||
superUser = SuperUsers(CONF['ldap:0'])
|
||||
|
||||
app = beaker.middleware.SessionMiddleware(bottle.app(), session_opts)
|
||||
#app = beaker.middleware.SessionMiddleware(bottle.app(), session_opts)
|
||||
app = SessionMiddleware(bottle.app(), session_opts)
|
||||
|
||||
bottle.TEMPLATE_PATH = [BASE_DIR]
|
||||
|
||||
|
Binary file not shown.
@ -70,7 +70,7 @@ class Tools():
|
||||
print('Wrong otp, please try again.')
|
||||
return False
|
||||
|
||||
def session_id(self):
|
||||
def key(self):
|
||||
return uuid.uuid4().hex
|
||||
|
||||
tools = Tools()
|
||||
|
@ -44,8 +44,8 @@ class LocalizeTo(object):
|
||||
str_29 = _("Token")
|
||||
str_30 = _("Disable")
|
||||
str_31 = _("Enable")
|
||||
str_32 = _("You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app.")
|
||||
str_33 = _("Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR.")
|
||||
str_32 = _("You must then use the key created by this QR code to log in. To get the key you must use a OTP or 2FA mobile app.")
|
||||
str_33 = _("Two-step authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will need to create using QR code.")
|
||||
str_34 = _("Code")
|
||||
|
||||
#messages
|
||||
|
156
locales/base.pot
156
locales/base.pot
@ -6,291 +6,285 @@
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: 0.0.3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-25 16:52+0200\n"
|
||||
"POT-Creation-Date: 2023-11-27 15:52+0100\n"
|
||||
"PO-Revision-Date: 2023-04-07 13:28+0200\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.2.2\n"
|
||||
|
||||
#: libs/localization.py:15
|
||||
msgid "User"
|
||||
msgstr "User"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:16
|
||||
msgid "Username"
|
||||
msgstr "Username"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:17
|
||||
msgid "Firstname"
|
||||
msgstr "Firstname"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:18
|
||||
msgid "Surname"
|
||||
msgstr "Surname"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:19
|
||||
msgid "Password"
|
||||
msgstr "Password"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:20
|
||||
msgid "Old password"
|
||||
msgstr "Old password"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:21
|
||||
msgid "New password"
|
||||
msgstr "New password"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:22
|
||||
msgid "Confirm password"
|
||||
msgstr "Confirm password"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:23
|
||||
msgid "Email"
|
||||
msgstr "Email"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:24
|
||||
msgid "edit"
|
||||
msgstr "edit"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:25
|
||||
msgid "Login"
|
||||
msgstr "Login"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:26
|
||||
msgid "Logout"
|
||||
msgstr "Logout"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:27
|
||||
msgid "Delete"
|
||||
msgstr "Delete"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:28
|
||||
msgid "Sign Up"
|
||||
msgstr "Sign Up"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:29
|
||||
msgid "Back"
|
||||
msgstr "Back"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:30
|
||||
msgid "Update"
|
||||
msgstr "Update"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:31
|
||||
msgid "Or Sign In"
|
||||
msgstr "Or Sign In"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:32
|
||||
msgid "Or Sign Up"
|
||||
msgstr "Or Sign Up"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:33
|
||||
msgid "Invite code"
|
||||
msgstr "Invite code"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:34
|
||||
msgid "Edit your fullname"
|
||||
msgstr "Edit your fullname"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:35
|
||||
msgid "Edit your email"
|
||||
msgstr "Edit your email"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:36
|
||||
msgid "Change your password"
|
||||
msgstr "Change your password"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:37
|
||||
msgid "Delete your account"
|
||||
msgstr "Delete your account"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:38 libs/localization.py:53
|
||||
msgid "Welcome"
|
||||
msgstr "Welcome"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:39
|
||||
msgid "Logs"
|
||||
msgstr "Logs"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:40
|
||||
msgid "Last login"
|
||||
msgstr "Last login"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:41
|
||||
msgid "Devices"
|
||||
msgstr "Devices"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:42
|
||||
msgid "show"
|
||||
msgstr "show"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:43
|
||||
msgid "Two factor authentication"
|
||||
msgstr "Two factor authentication"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:44
|
||||
msgid "Token"
|
||||
msgstr "Token"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:45
|
||||
msgid "Disable"
|
||||
msgstr "Disable"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:46
|
||||
msgid "Enable"
|
||||
msgstr "Enable"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:47
|
||||
msgid "You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app."
|
||||
msgstr "You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app."
|
||||
msgid "You must then use the key created by this QR code to log in. To get the key you must use a OTP or 2FA mobile app."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:48
|
||||
msgid "Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR."
|
||||
msgstr "Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR."
|
||||
msgid "Two-step authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will need to create using QR code."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:49
|
||||
msgid "Code"
|
||||
msgstr "Code"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:52
|
||||
msgid "The session was closed."
|
||||
msgstr "The session was closed."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:54
|
||||
msgid "Username must be at least 3 characters long!"
|
||||
msgstr "Username must be at least 3 characters long!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:55
|
||||
msgid "Not allowed characters for the username field."
|
||||
msgstr "Not allowed characters for the username field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:56
|
||||
msgid "Not allowed characters for the firstname field."
|
||||
msgstr "Not allowed characters for the firstname field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:57
|
||||
msgid "Not allowed characters for the surname field."
|
||||
msgstr "Not allowed characters for the surname field."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:58
|
||||
msgid "The code is invalid or has expired."
|
||||
msgstr "The code is invalid or has expired."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:59
|
||||
msgid "Passwords do not match!"
|
||||
msgstr "Passwords do not match!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:60
|
||||
msgid ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"a capital letter and a special character."
|
||||
msgid "The password must contain at least 8 characters, at least one number, a capital letter and a special character."
|
||||
msgstr ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"a capital letter and a special character."
|
||||
|
||||
#: libs/localization.py:61
|
||||
msgid "Congratulations, your account has been created!"
|
||||
msgstr "Congratulations, your account has been created!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:62
|
||||
msgid "Your first and last name have not been changed."
|
||||
msgstr "Your first and last name have not been changed."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:63
|
||||
msgid "Your firstname is a bit short, don't you think?"
|
||||
msgstr "Your firstname is a bit short, don't you think?"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:64
|
||||
msgid "Your surname is a bit short, don't you think?"
|
||||
msgstr "Your surname is a bit short, don't you think?"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:65
|
||||
msgid "Your first and last name have been successfully updated."
|
||||
msgstr "Your first and last name have been successfully updated."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:66
|
||||
msgid "Invalid email address. Please try again."
|
||||
msgstr "Invalid email address. Please try again."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:67
|
||||
msgid "Email address has not been changed."
|
||||
msgstr "Email address has not been changed."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:68
|
||||
msgid "Your email has been successfully updated."
|
||||
msgstr "Your email has been successfully updated."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:69
|
||||
msgid "The password entered is the same as the current password."
|
||||
msgstr "The password entered is the same as the current password."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:70
|
||||
msgid "Password has been changed!"
|
||||
msgstr "Password has been changed!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:71
|
||||
msgid "Please, type your username for account deletion."
|
||||
msgstr "Please, type your username for account deletion."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:72
|
||||
msgid "Account successfully deleted!"
|
||||
msgstr "Account successfully deleted!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:73
|
||||
msgid "Username or password is incorrect!"
|
||||
msgstr "Username or password is incorrect!"
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:74
|
||||
msgid "Unable to connect to the remote server."
|
||||
msgstr "Unable to connect to the remote server."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:75
|
||||
msgid ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
msgid "Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
|
||||
#: libs/localization.py:76
|
||||
msgid "User already exists."
|
||||
msgstr "User already exists."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:77
|
||||
msgid "Email already exists."
|
||||
msgstr "Email already exists."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:78
|
||||
msgid "Forgot your password? Please try again."
|
||||
msgstr "Forgot your password? Please try again."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:79
|
||||
msgid "The session has expired."
|
||||
msgstr "The session has expired."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:80
|
||||
msgid "Registration is currently closed. We apologize for the inconvenience."
|
||||
msgstr "Registration is currently closed. We apologize for the inconvenience."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:81
|
||||
msgid "Two factor authentication has been impossible."
|
||||
msgstr "Two factor authentication has been impossible."
|
||||
msgid "Two factor authentication has been impossible."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:82
|
||||
msgid "Two factor authentication has been restored."
|
||||
msgstr "Two factor authentication has been restored."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:83
|
||||
msgid "Two factor authentication has been enabled."
|
||||
msgstr "Two factor authentication has been enabled."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:84
|
||||
msgid "Two factor authentication has been disabled."
|
||||
msgstr "Two factor authentication has been disabled."
|
||||
msgstr ""
|
||||
|
||||
#: libs/localization.py:85
|
||||
msgid "Two factor authentication was already disabled."
|
||||
msgstr "Two factor authentication was already disabled."
|
||||
msgstr ""
|
||||
|
Binary file not shown.
@ -3,19 +3,19 @@
|
||||
# This file is distributed under the same license as the PACKAGE package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Project-Id-Version: 0.0.3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-25 16:52+0200\n"
|
||||
"PO-Revision-Date: 2023-04-07 13:28+0200\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"PO-Revision-Date: 2023-11-27 15:37+0100\n"
|
||||
"Last-Translator: \n"
|
||||
"Language-Team: \n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"X-Generator: Poedit 3.2.2\n"
|
||||
|
||||
#: libs/localization.py:15
|
||||
msgid "User"
|
||||
@ -146,12 +146,12 @@ msgid "Enable"
|
||||
msgstr "Enable"
|
||||
|
||||
#: libs/localization.py:47
|
||||
msgid "You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app."
|
||||
msgstr "You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app."
|
||||
msgid "You must then use the key created by this QR code to log in. To get the key you must use a OTP or 2FA mobile app."
|
||||
msgstr "You must then use the key created by this QR code to log in. To get the key you must use a OTP or 2FA mobile app."
|
||||
|
||||
#: libs/localization.py:48
|
||||
msgid "Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR."
|
||||
msgstr "Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR."
|
||||
msgid "Two-step authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will need to create using QR code."
|
||||
msgstr "Two-step authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will need to create using QR code."
|
||||
|
||||
#: libs/localization.py:49
|
||||
msgid "Code"
|
||||
@ -186,12 +186,8 @@ msgid "Passwords do not match!"
|
||||
msgstr "Passwords do not match!"
|
||||
|
||||
#: libs/localization.py:60
|
||||
msgid ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"a capital letter and a special character."
|
||||
msgstr ""
|
||||
"The password must contain at least 8 characters, at least one number, "
|
||||
"a capital letter and a special character."
|
||||
msgid "The password must contain at least 8 characters, at least one number, a capital letter and a special character."
|
||||
msgstr "The password must contain at least 8 characters, at least one number, a capital letter and a special character."
|
||||
|
||||
#: libs/localization.py:61
|
||||
msgid "Congratulations, your account has been created!"
|
||||
@ -250,10 +246,8 @@ msgid "Unable to connect to the remote server."
|
||||
msgstr "Unable to connect to the remote server."
|
||||
|
||||
#: libs/localization.py:75
|
||||
msgid ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr ""
|
||||
"Encountered an unexpected error while communicating with the remote server."
|
||||
msgid "Encountered an unexpected error while communicating with the remote server."
|
||||
msgstr "Encountered an unexpected error while communicating with the remote server."
|
||||
|
||||
#: libs/localization.py:76
|
||||
msgid "User already exists."
|
||||
@ -276,7 +270,7 @@ msgid "Registration is currently closed. We apologize for the inconvenience."
|
||||
msgstr "Registration is currently closed. We apologize for the inconvenience."
|
||||
|
||||
#: libs/localization.py:81
|
||||
msgid "Two factor authentication has been impossible."
|
||||
msgid "Two factor authentication has been impossible."
|
||||
msgstr "Two factor authentication has been impossible."
|
||||
|
||||
#: libs/localization.py:82
|
||||
|
Binary file not shown.
@ -5,10 +5,10 @@
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: 0.0.1\n"
|
||||
"Project-Id-Version: 0.0.3\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2022-04-07 17:23+0200\n"
|
||||
"PO-Revision-Date: 2023-11-24 20:21+0100\n"
|
||||
"PO-Revision-Date: 2023-11-27 15:36+0100\n"
|
||||
"Last-Translator: Aitzol Berasategi <aitzol@lainoa.eus>\n"
|
||||
"Language-Team: LANGUAGE <EU@eu.org>\n"
|
||||
"Language: eu\n"
|
||||
@ -146,14 +146,12 @@ msgid "Enable"
|
||||
msgstr "Gaitu"
|
||||
|
||||
#: libs/localization.py:47
|
||||
msgid "You must then use the following code to log in. Using the key you will receive by reading the QR code via a OTP or 2FA mobile app."
|
||||
msgstr ""
|
||||
"Aurrerantzean ondorengo kodea erabili beharko duzu saioa hasteko. Mugikorrerako OTP edo 2FA aplikazio baten bidez QR kodea irakurtzean jasoko duzun gakoa baliatuz "
|
||||
"horretarako."
|
||||
msgid "You must then use the key created by this QR code to log in. To get the key you must use a OTP or 2FA mobile app."
|
||||
msgstr "Aurrerantzean QR kode honen bidez sortutako gakoa erabili beharko duzu saioa hasteko. Gakoa lortzeko mugikorrerako OTP edo 2FA aplikazio bat erabili beharko duzu."
|
||||
|
||||
#: libs/localization.py:48
|
||||
msgid "Two factor authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will receive by QR."
|
||||
msgstr "Bi urratseko autentifikazioa segurtasun gehigarri bat da. Hau gaituz saio hasieran erabiltzaile eta pasahitzaz gain QR bidez jasoko duzun gako bat eskatuko zaizu."
|
||||
msgid "Two-step authentication is additional security. By enabling this you will be asked at the login, in addition to the user and password, a key you will need to create using QR code."
|
||||
msgstr "Bi urratseko autentifikazioa segurtasun gehigarri bat da. Hau gaituz saio hasieran erabiltzaile eta pasahitzaz gain QR kode bidez sortu beharko duzun gako bat eskatuko zaizu."
|
||||
|
||||
#: libs/localization.py:49
|
||||
msgid "Code"
|
||||
|
@ -1,3 +1,4 @@
|
||||
Beaker>=1.12.1
|
||||
bottle>=0.12.19
|
||||
bottle-beaker>=0.1.3
|
||||
ldap3>=2.9.1
|
||||
@ -5,3 +6,6 @@ uwsgi>=2.0.21
|
||||
pyyaml>=6.0
|
||||
ua-parser>=0.16.1
|
||||
user-agents>=2.2.0
|
||||
cryptocode==0.1
|
||||
onetimepass==1.0.1
|
||||
segno==1.5.3
|
||||
|
11
start.sh
11
start.sh
@ -1,9 +1,9 @@
|
||||
##############################
|
||||
#!/bin/bash
|
||||
##############################
|
||||
## Erabilera: ##
|
||||
## sudo chmod +x start.sh ##
|
||||
## ./start.sh $UID ##
|
||||
##############################
|
||||
#!/bin/bash
|
||||
if [ ! -f settings.ini ]; then
|
||||
cp settings.ini.example settings.ini
|
||||
fi
|
||||
@ -11,8 +11,11 @@ fi
|
||||
if [[ $# -gt 0 ]]; then
|
||||
UID_=$1
|
||||
echo $UID_
|
||||
export LDAP_ADMIN_PASSWORD=admin
|
||||
export LDAP_READONLY_PASSWORD=readonly
|
||||
else
|
||||
UID_=$UID
|
||||
fi
|
||||
|
||||
export LDAP_ADMIN_PASSWORD=admin
|
||||
export LDAP_READONLY_PASSWORD=readonly
|
||||
|
||||
uwsgi --http :9090 --enable-threads --uid $UID_ --wsgi-file app.py
|
||||
|
Loading…
x
Reference in New Issue
Block a user