Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

144
Views
¿Mi sitio web extremadamente simple es seguro contra XSS?

Creé un sitio web que obtiene la ruta de su solicitud y la devuelve en una etiqueta <link> como esta:

<link rel="canonical" href="PATH_HERE">

Puede ir a cualquier ruta que desee e insertar lo que quiera allí, y lo único que se desinfecta son las comillas dobles ( " ).

El back-end:

 from flask import Flask app = Flask(__name__) # Catch every possible route @app.route('/', defaults={'path': '/'}) @app.route('/<path:path>') def catch_all(path): path = path.replace('"', "&quot;") return f""" <head> <title>Website</title> <link rel="canonical" href="{path}"> </head> """ if __name__ == '__main__': app.run(host="0.0.0.0", port=8080)

Aquí está el HTML devuelto al realizar una solicitud a https://website.com/hello :

 <html><head> <title>Website</title> <link rel="canonical" href="hello"> </head> <body></body></html>

Y aquí está el HTML devuelto al realizar una solicitud a https://website.com/"</link><script>alert(1)</script> :

 <html><head> <title>Website</title> <link rel="canonical" href="&quot;</link><script>alert(1)</script>"> </head> <body></body></html>

Me pregunto si es posible utilizar XSS en este sitio web.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!