Moodle

Langimport makes bad assumption about http headers

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.8
  • Component/s: Administration
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

The language import function makes a bad assumption about http headers when going through a proxy only being 12 lines long, when in reality they could be longer or shorter...

In my case I discovered this as it imported a blank line as an available language, but it could perhaps interpret a http header line as a language in a different scenario.

My solution is to scan through the file until you find a CRLF, as per RFC1945, rather than just counting to 12.

This guarantees we're at the start of the body (assuming a standards compliant webserver )

Issue Links

Activity

Hide
Jon Papaioannou added a comment -

Fixed in STABLE and HEAD with Dan's patch.

Show
Jon Papaioannou added a comment - Fixed in STABLE and HEAD with Dan's patch.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: