Compare commits
2
Commits
718cdf6c89
..
req
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a0670e7b4d
|
||
|
|
e5c8a8c6f2
|
No files matched your search
+1
-3
@@ -1,3 +1 @@
|
|||||||
__pycache__
|
luser/__pycache__/
|
||||||
luser.deb
|
|
||||||
build-deb/luser/var/
|
|
||||||
@@ -4,8 +4,8 @@ Priority: optional
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Essential: no
|
Essential: no
|
||||||
Installed-Size: 2000
|
Installed-Size: 2000
|
||||||
Depends: python3-flask, python3-ldap3, gunicorn
|
Depends: python3-flask, python3-ldap3
|
||||||
Homepage: https://gitea.dmz.rs/fram3d/luser
|
Homepage: https://gitea.dmz.rs/fram3d/luser
|
||||||
Maintainer: fram3d <fram3d@dmz.rs>
|
Maintainer: fram3d <fram3d@dmz.rs>
|
||||||
Description: Web app that allows users to add,remove and change passwords in LDAP system
|
Description: Web app that allows users to add,remove and change passwords in LDAP system
|
||||||
Version: 1.0.2
|
Version: 1.0.0
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
/usr/bin/systemctl enable luser.service
|
|
||||||
/sbin/service luser start
|
|
||||||
cp /tmp/oldluserconfig.ini /var/luser/luser/config.ini
|
|
||||||
rm /tmp/oldluserconfig.ini
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
cp /var/luser/luser/config.ini /tmp/oldluserconfig.ini
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
/sbin/service luser stop
|
|
||||||
/usr/bin/systemdctl disable luser.service
|
|
||||||
cp /var/luser/luser/config.ini /tmp/oldluserconfig.ini
|
|
||||||
@@ -91,7 +91,6 @@ def register():
|
|||||||
elif request.method == 'POST':
|
elif request.method == 'POST':
|
||||||
username = request.form['username']
|
username = request.form['username']
|
||||||
password = request.form['password']
|
password = request.form['password']
|
||||||
confirmpassword = request.form['confirmpassword']
|
|
||||||
captcha_answer = request.form['captchaa']
|
captcha_answer = request.form['captchaa']
|
||||||
captcha_filename = request.form['captchaq']
|
captcha_filename = request.form['captchaq']
|
||||||
captcha_path = CAPTCHA_PATH + captcha_filename
|
captcha_path = CAPTCHA_PATH + captcha_filename
|
||||||
@@ -118,14 +117,6 @@ def register():
|
|||||||
if len(password) < 8:
|
if len(password) < 8:
|
||||||
return 'Error: password is too short'
|
return 'Error: password is too short'
|
||||||
|
|
||||||
# Check lenght of password
|
|
||||||
if password != confirmpassword:
|
|
||||||
return 'Error: passwords do not match'
|
|
||||||
|
|
||||||
# Check if username has uppercase
|
|
||||||
if username.islower() == False:
|
|
||||||
return 'Error: uppercase characters in username are not allowed'
|
|
||||||
|
|
||||||
# Create a LUSER connection
|
# Create a LUSER connection
|
||||||
luser = LUSER(LDAPHOST,LDAPADMINNAME,LDAPPASS,USERBASE,ALTUSERBASE)
|
luser = LUSER(LDAPHOST,LDAPADMINNAME,LDAPPASS,USERBASE,ALTUSERBASE)
|
||||||
# Try to add user
|
# Try to add user
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="sr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="/styles/reset.css">
|
|
||||||
<link rel="stylesheet" href="/styles/style.css">
|
|
||||||
<link rel="stylesheet" href="/styles/account.css">
|
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
|
|
||||||
<title>User password change in LDAP system</title>
|
<title>User password change in LDAP system</title>
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
max-width:900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
color: #3d3d3d;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="sr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="/styles/reset.css">
|
|
||||||
<link rel="stylesheet" href="/styles/style.css">
|
|
||||||
<link rel="stylesheet" href="/styles/account.css">
|
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
|
|
||||||
<title>User registration to LDAP system</title>
|
<title>User registration to LDAP system</title>
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
max-width:900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
color: #3d3d3d;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
@@ -17,11 +25,9 @@
|
|||||||
<input type="text" name="username" id="username" placeholder="username" required>
|
<input type="text" name="username" id="username" placeholder="username" required>
|
||||||
<label for="password">password</label>
|
<label for="password">password</label>
|
||||||
<input type="password" name="password" id="password" placeholder="password" required>
|
<input type="password" name="password" id="password" placeholder="password" required>
|
||||||
<label for="confirmpassword">confirmpassword</label>
|
|
||||||
<input type="password" name="confirmpassword" id="confirmpassword" placeholder="confirmpassword" required>
|
|
||||||
<p>password must be at least 8 characters long<p>
|
<p>password must be at least 8 characters long<p>
|
||||||
<br>
|
<br>
|
||||||
<img src=/account/register/captcha_img/{{ imgsrc }} alt="{{ captchahash }}" style="width:200;margin:auto;">
|
<img src=/account/register/captcha_img/{{ imgsrc }} alt="{{ captchahash }}" style="width:200">
|
||||||
<p>
|
<p>
|
||||||
<label for="captcha answer">captcha answer</label>
|
<label for="captcha answer">captcha answer</label>
|
||||||
<input type="text" name="captchaa" id="captchaa" placeholder="captcha answer" required>
|
<input type="text" name="captchaa" id="captchaa" placeholder="captcha answer" required>
|
||||||
|
|||||||
@@ -1,13 +1,21 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="sr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="stylesheet" href="/styles/reset.css">
|
|
||||||
<link rel="stylesheet" href="/styles/style.css">
|
|
||||||
<link rel="stylesheet" href="/styles/account.css">
|
|
||||||
<link rel="shortcut icon" href="/img/favicon.ico" type="image/x-icon">
|
|
||||||
<title>User unregistration to LDAP system</title>
|
<title>User unregistration to LDAP system</title>
|
||||||
|
<style>
|
||||||
|
.container {
|
||||||
|
max-width:900px;
|
||||||
|
margin: 0 auto;
|
||||||
|
font-family: Arial, Helvetica, sans-serif;
|
||||||
|
color: #3d3d3d;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background-color: #e6e6e6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<main class="container">
|
<main class="container">
|
||||||
|
|||||||
@@ -1,2 +1,3 @@
|
|||||||
ldap3
|
ldap3
|
||||||
flask
|
flask
|
||||||
|
passlib
|
||||||
Reference in new issue
Block a user