Oct. 15, 2023, 4:34 p.m. | Arun balaji

InfoSec Write-ups - Medium infosecwriteups.com

Analyzing Character Length Changes with the upper() Method

Hello Everyone, I’d like to share an intriguing discovery I made during a recent CTF (Capture The Flag) challenge centered around the Python upper() method.

Source Code:

@app.route('/login',methods=['GET','POST'])
def login():
if request.method == 'GET':
return render_template('login.html')
elif request.method == 'POST':
if len(request.values["username"]) >= 40:
return render_template_string("Username is too long!")
elif len(request.values["username"].upper()) <= 50:
return render_template_string("Username is too short!")
else:
return flag

Our Goal is to get the flag here but we need …

ctf ctf-writeup python web

CyberSOC Technical Lead

@ Integrity360 | Sandyford, Dublin, Ireland

Cyber Security Strategy Consultant

@ Capco | New York City

Cyber Security Senior Consultant

@ Capco | Chicago, IL

Sr. Product Manager

@ MixMode | Remote, US

Corporate Intern - Information Security (Year Round)

@ Associated Bank | US WI Remote

Senior Offensive Security Engineer

@ CoStar Group | US-DC Washington, DC