{'context_id': 490, 'vulnerable': True, 'processing': False, 'request': {'url': 'http://www.martinez.com/main/app/taghome.htm', 'method': 'DELETE', 'headers': {'HOST': '127.0.0.1:5000', 'USER_AGENT': 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', 'ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'ACCEPT_LANGUAGE': 'en-US,en;q=0.5', 'ACCEPT_ENCODING': 'gzip, deflate, br, zstd', 'REFERER': 'http://127.0.0.1:5000/guestbook', 'CONNECTION': 'keep-alive', 'COOKIE': 'csrftoken=7GgBqVlBL6WuGdfu3e6EBXep8N5vFiVm; grafana_session=54c841e9cb2f4956a7c791efd284d120; grafana_session_expiry=1735995560; user_id=2; session_token=b3c634c91e1711c794704a031918a34b; session=eyJjc3JmX3Rva2VuIjoiMzNkNDNlNjA2MDhiMjdjZjBiMGI1Yzk3NWU4MDExZjRjYWMxMzRhNyJ9.Z5GBRA.Q8r4qzslZbU-6Y0h-x9F551fn1A', 'UPGRADE_INSECURE_REQUESTS': '1', 'SEC_FETCH_DEST': 'document', 'SEC_FETCH_MODE': 'navigate', 'SEC_FETCH_SITE': 'same-origin', 'SEC_FETCH_USER': '?1', 'PRIORITY': 'u=0, i', 'Content-Type': 'application/x-www-form-urlencoded', 'User-Agent': 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_0 like Mac OS X; nn-NO) AppleWebKit/531.5.4 (KHTML, like Gecko) Version/3.0.5 Mobile/8B111 Safari/6531.5.4'}, 'body': b'csrfmiddlewaretoken=94cca464-d9fe-4ed3-ac18-0d383828ddfb&newpass1=fsIXN4mt&newpass2=Mzy2Jh0O'}, 'control_flow': {0: "search_query = request.args.get('q')", 1: 'comments = db.get(search_query)', 2: 'db = init()', 3: "db = sqlite3.connect('data.db')", 4: "db.cursor().execute('CREATE TABLE IF NOT EXISTS comments (id INTEGER PRIMARY KEY, comment TEXT, date TEXT)')", 5: 'return db', 6: 'results = []', 7: "for(comment, date) in db.cursor().execute('SELECT comment, date FROM comments').fetchall():", 8: 'if query is None or query in comment:', 9: 'results.append((comment, date))', 10: "for(comment, date) in db.cursor().execute('SELECT comment, date FROM comments').fetchall():", 11: 'return results', 12: 'form = forms.AddCommentForm()', 13: 'if form.validate_on_submit():', 14: "return render_template('guestbook.html', form=form, comments=comments, search_query=search_query)", 15: '', 16: '<head>', 17: '<!-- Required meta tags -->', 18: '<meta charset="utf-8">', 19: '<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">', 20: '', 21: '<title>My Guestbook</title>', 22: '', 23: '<!-- Bootstrap CSS -->', 24: '<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"', 25: 'integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">', 26: '', 27: '<!-- Styling -->', 28: '<link rel="stylesheet" type="text/css" href="../static/styles/guestbook.css">', 29: '<link rel="icon" type="image/x-icon" href="../static/guestbook.ico">', 30: '</head>', 31: '', 32: '<div class="content center">', 33: '<div class="container-fluid">', 34: '<form action="{{ url_for(\'guestbook\') }}" method="post">', 35: '{{ form.csrf_token }}', 36: '<div class="row">', 37: '<h3 class="form-header">Add a new Guestbook entry 😊</h3>', 38: '<div class="col">', 39: '{{ form.comment(class="form-control form-comment") }}', 40: '</div>', 41: '<div class="col">', 42: '', 43: '<p class="search-hint">Psssst.. you can even <a href="{{ url_for(\'guestbook\', q=\'test\') }}"', 44: 'class="search-hint-anchor">search</a> through the', 45: 'comments 🤫</p>', 46: '', 47: '{% if not search_query %}', 48: '<h3 class="comment-header">Current guestbook entries:</h3>', 49: '{% else %}', 50: '<h3 class="comment-header">Results for "{{ search_query }}"</h3>', 51: '<p class="search-hint">Psssst.. you can even <a href="{{ url_for(\'guestbook\', q=\'test\') }}"', 52: '{% endif %}', 53: '', 54: '{% for comment, date in comments %}', 55: '<div class="comment">'}, 'response': {'status_code': '400', 'headers': {'Content-Type': 'application/json', 'Content-Length': '1867', 'Vary': 'Cookie'}}}