~ubuntu-branches/ubuntu/dapper/moodle/dapper-security

« back to all changes in this revision

Viewing changes to debian/postinst

  • Committer: Bazaar Package Importer
  • Author(s): Daniel T Chen
  • Date: 2006-06-09 22:21:34 UTC
  • Revision ID: james.westby@ubuntu.com-20060609222134-sdqnl3z5bws1knge
Tags: 1.5.3+20060108-1ubuntu1.1
* [SECURITY] Fix multiple XSS and SQL injection vulnerabilities:
  - Due to a failure to properly sanitise user input, there's a
    PostgreSQL SQL injection vulnerability in
    lib/adodb/drivers/adodb-postgres64.inc.php as described in
    CVE-2006-0410. Patch applied from Debian #360395.
  - The embedded version of lib/adodb/adodb-pager.inc.php is
    susceptible to XSS as described in CVE-2006-0806. Patch applied
    from Debian #360396.
* References:
  http://bugs.debian.org/360395, CVE-2006-0410;
  http://bugs.debian.org/360396, CVE-2006-0806.
* debian/:
  - postinst: Handle the upgrade path from any previous packaging
    revision in Breezy and Dapper that depends on apache2 but
    mistakenly uses apache in the debconf template.
  - templates: Use apache2 by default since, well, that's what the
    dependency prefers. Now Moodle actually installs.
  (Closes: Malone #5501, Malone #47812).

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    dbu_password="$RET"
55
55
}
56
56
 
 
57
fix_broken_webserver_conf() {
 
58
        get_config
 
59
        # fix debconf template brokenness from moodle versions in Ubuntu
 
60
        # Breezy (1.5.2-1ubuntu1) through Dapper (1.5.3+20060108-1ubuntu1):
 
61
        # apache2 is the actual dependency, but apache mistakenly remained
 
62
        # the default template setting for webserver.
 
63
        if dpkg --compare-versions "$2" lt "1.5.3+20060108-1ubuntu1.1"; then
 
64
                db_fget moodle/webserver seen
 
65
                if [ "$RET" = "false" ] || ! dpkg -l "$webserver" 2>/dev/null |grep ^ii >/dev/null
 
66
                then
 
67
                    db_set moodle/webserver apache2
 
68
                fi
 
69
        fi
 
70
}
 
71
 
57
72
handle_config() {
58
73
         if [ "$webserver" = "apache-ssl" ]
59
74
         then
132
147
        moodledir=/usr/share/moodle
133
148
        
134
149
        # Read debconf and edit the config file accordingly
 
150
        fix_broken_webserver_conf
135
151
        get_config
136
152
        db_stop
137
153
        exec 0<&1