~ubuntu-branches/ubuntu/intrepid/phpmyadmin/intrepid-security

« back to all changes in this revision

Viewing changes to libraries/select_lang.lib.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2006-11-22 22:24:02 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20061122222402-jwfycdbd9100jzti
Tags: 4:2.9.1.1-1
* New upstream release.
  - Addresses several security issues (Closes: #399329).

* In Depends, explicitly prefer the apache2/apache PHP module, to make
  sure the correct one is selected upon installation.
* Drop 100-dutch_fixtypo.patch, integrated upstream.

* Add note to default config file about adding sensitive data
  to that file (Closes: #321529).
* Update README.Debian with information about register_globals.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
<?php
2
 
/* $Id: select_lang.lib.php 9121 2006-06-21 10:40:41Z lem9 $ */
 
2
/* $Id: select_lang.lib.php 9711 2006-11-17 09:32:12Z nijel $ */
3
3
// vim: expandtab sw=4 ts=4 sts=4:
4
4
 
5
5
/**
39
39
    if (! empty($_POST['lang'])) {
40
40
        if (PMA_langSet($_POST['lang'])) {
41
41
            return true;
 
42
        } elseif (!is_string($_POST['lang'])) {
 
43
            /* Faked request, don't care on localisation */
 
44
            $GLOBALS['lang_failed_request'] = 'Yes';
42
45
        } else {
43
46
            $GLOBALS['lang_failed_request'] = $_POST['lang'];
44
47
        }
48
51
    if (! empty($_GET['lang'])) {
49
52
        if (PMA_langSet($_GET['lang'])) {
50
53
            return true;
 
54
        } elseif (!is_string($_GET['lang'])) {
 
55
            /* Faked request, don't care on localisation */
 
56
            $GLOBALS['lang_failed_request'] = 'Yes';
51
57
        } else {
52
58
            $GLOBALS['lang_failed_request'] = $_GET['lang'];
53
59
        }
57
63
    if (! empty($_COOKIE['pma_lang'])) {
58
64
        if (PMA_langSet($_COOKIE['pma_lang'])) {
59
65
            return true;
 
66
        } elseif (!is_string($_COOKIE['lang'])) {
 
67
            /* Faked request, don't care on localisation */
 
68
            $GLOBALS['lang_failed_request'] = 'Yes';
60
69
        } else {
61
70
            $GLOBALS['lang_failed_cookie'] = $_COOKIE['pma_lang'];
62
71
        }
95
104
 */
96
105
function PMA_langSet(&$lang)
97
106
{
98
 
    if (empty($lang) || empty($GLOBALS['available_languages'][$lang])) {
 
107
    if (!is_string($lang) || empty($lang) || empty($GLOBALS['available_languages'][$lang])) {
99
108
        return false;
100
109
    }
101
110
    $GLOBALS['lang'] = $lang;