Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#10226 closed defect (bug) (fixed)

Sanitization bypass in clean_url and wp_sanitise redirect

Reported by: westi's profile westi Owned by: westi's profile westi
Milestone: 2.8.1 Priority: normal
Severity: normal Version: 2.8
Component: Security Keywords:
Focuses: Cc:

Description

Following on from #4819, while writing unit tests for clean_url I noticed an issue with the way in which it removes %0d and %0a from urls.

It expects the miscreant to have been nice and used lower case letters so %0D and %0A just slip straight through.

This also affects wp_safe_redirect and clean_url can currently be bypassed in the same way that wp_safe_redirect could before #4819 is fixed.

Change History (7)

#1 @westi
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [11615]) Introduce _deep_replace() and use it to improve the stripping of percent encoded values from urls. Fixes #10226 for trunk.

#2 @westi
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopen for 2.8.1

#3 @westi
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [11616]) Introduce _deep_replace() and use it to improve the stripping of percent encoded values from urls. Fixes #10226 for 2.8.1

#4 follow-up: @Denis-de-Bernardy
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

seems like there's a buggy loop, with one or both of:

  • %0%0%0DAD
  • %0%0%0ADA

#5 in reply to: ↑ 4 @westi
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

Replying to Denis-de-Bernardy:

seems like there's a buggy loop, with one or both of:

  • %0%0%0DAD
  • %0%0%0ADA

Nope both of those are covered fine.

#6 @ryan
17 years ago

(In [11622]) Load formatting.php before install redirect so that wp_redirect() can call _deep_replace(). see #10226

#7 @ryan
17 years ago

(In [11623]) Load formatting.php before install redirect so that wp_redirect() can call _deep_replace(). see #10226

Note: See TracTickets for help on using tickets.