Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
- Create user bug fix, allowed any user to create a new user (inc admin accounts)
- Removing debug code from  web app
  • Loading branch information
Ziconius committed Jul 14, 2019
1 parent 835dcd3 commit 2c842ed
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions FudgeC2/ServerApp/ImplantManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,6 @@ def page_not_found(e):
# ------------------------------ #
@app.route("/auth/login", methods=['GET', 'POST'])
def login():
#!!
dbg = False
if dbg == True:
UserObject = UsrMgmt.user_login("admin", "letmein")
login_user(UserObject)
return redirect(url_for("BaseHomePage"))


if request.method == "POST":
if 'email' in request.form and 'password' in request.form and request.form['email'] != None and request.form['password'] != None:
UserObject = UsrMgmt.user_login(request.form['email'],request.form['password'])
Expand Down
2 changes: 1 addition & 1 deletion FudgeC2/ServerApp/modules/UserManagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def add_new_user(self, formdata=None, submitting_user=None):
Result_Dict['reason'] = "Username too short"
return Result_Dict
U = self.db.user.Get_UserObject(submitting_user)
if U.admin:
if U.admin == 1:
G = self.db.user.Get_UserObject(formdata['UserName'])
admin = False
if 'is_admin' in formdata:
Expand Down

0 comments on commit 2c842ed

Please sign in to comment.