Skip to content

Commit

Permalink
fixed an 'Authenticated Cross-Site Scripting' bug on the command help…
Browse files Browse the repository at this point in the history
… page reported by 'Mohamed A. Baset' of 'Seekurity SA de C.V.' at 'Seekurity.com' on April 17,2020
  • Loading branch information
its-a-feature committed Apr 19, 2020
1 parent f0fa9e6 commit 5fc6450
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apfell-docker/app/routes/api_routes.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
from app import apfell, links, use_ssl
from app import apfell, links, use_ssl, db_objects
from sanic import response
from jinja2 import Environment, PackageLoader
from sanic_jwt.decorators import scoped, inject_user
from app.routes.routes import respect_pivot
import urllib.parse
import app.database_models.model as db_model

env = Environment(loader=PackageLoader('app', 'templates'))

Expand All @@ -15,7 +16,11 @@ async def apiui_command_help(request, user):
template = env.get_template('apiui_command_help.html')
if len(request.query_args) != 0:
data = urllib.parse.unquote(request.query_args[0][1])
print(data)
query = await db_model.payloadtype_query()
try:
payloadtype = await db_objects.get(query, ptype=data)
except Exception as e:
data = ""
else:
data = ""
if use_ssl:
Expand Down

0 comments on commit 5fc6450

Please sign in to comment.