Project

General

Profile

Actions

Bug #12698

closed

Insufficient URL validation for smart proxy and medium

Added by Daniel Lobato Garcia over 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Security
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Problem: The regex that validates smart proxies URLs only matches 'beginning of text'. This allows us to add just \n after a valid URL and put anything after it. For instance, javascript:alert('hacked'). I haven't found any link to the Foreman proxy URL so the script would not trigger, but if we were to put link_to @smart_proxy.url somewhere (or a plugin did this) it would be unsafe.

Solution: Make the regex match the end of the URL with \Z


Related issues 2 (1 open1 closed)

Related to Foreman - Feature #12787: The url validator accepts bad urls like "https://"NewDavid Davis12/11/2015Actions
Has duplicate Foreman - Bug #12697: Insufficient validation for smart proxy URLDuplicateDaniel Lobato Garcia12/04/2015Actions
Actions

Also available in: Atom PDF