Menu

#2555 (ok 2.11.4) tbl_alter.php: Missing parameter: field

2.11.1
fixed
1
2014-08-22
2007-10-15
Z0l0ft
No

******** System ******

PMA 2.11.1
MySQL: 5.0.18
PHP: 5.1.2
XP SP2
FireFox: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.7) Gecko/20070914 Firefox/2.0.0.7

******** Reproduce steps ******

1. Config:
$cfg['Servers'][$i]['auth_type'] = 'cookie';
$cfg['LoginCookieValidity'] = 5; // So one would not have to wait too long when testing...

2. Click a database

3. Click a table -> "Structure"

4. Wait until you are sure timeout has entered and passed your timezone.

5. Click on "Change" icon in the table-view

6. Re-enter user name and password, Click Go.

7. Voila...

******** Reproduce debated ******

In tbl_structure.php;

When clicking on the "Action" item "Change" and logg out occur as of timeout; the parameter "field" are missing on re-entering
hence producing the error message "tbl_alter.php: Missing parameter: field (FAQ 2.8)" - line 1836 in common.lib.php

Understand the other "Action" items can not be executed on login as they require the "sql_query" parameter which could be misused,
but the "field" parameter could be processed with additional;

if(!empty($GLOBALS['field'])){
echo '<input type="hidden" name="field" value="'.htmlspecialchars($GLOBALS['field']).'" />'."\n";
}

in cookie.auth.lib.php

and

'field' in $allow_list of common.inc.php.

----
OR
----

Change "target" in login form to "tbl_structure.php" if it is "tbl_alter.php"

#

Discussion

  • Marc Delisle

    Marc Delisle - 2007-12-18
    • assigned_to: nobody --> lem9
     
  • Marc Delisle

    Marc Delisle - 2007-12-18
    • priority: 5 --> 1
    • summary: tbl_alter.php: Missing parameter: field --> (ok 2.11.4) tbl_alter.php: Missing parameter: field
    • status: open --> open-fixed
     
  • Marc Delisle

    Marc Delisle - 2007-12-18

    Logged In: YES
    user_id=210714
    Originator: NO

    Fixed in subversion, thanks for reporting.

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    joust want to note that there are other places affected too ...

     
  • Marc Delisle

    Marc Delisle - 2007-12-19

    Logged In: YES
    user_id=210714
    Originator: NO

    I would be glad to "fix" them also... please share some examples :)

     
  • Sebastian Mendel

    Logged In: YES
    user_id=326580
    Originator: NO

    f.e.

    import.php: Missing parameter: import_type (FAQ 2.8)
    import.php: Missing parameter: format (FAQ 2.8)

    when clicking on 'reload/fresh? sql' after timeout

     
  • Marc Delisle

    Marc Delisle - 2007-12-19

    Logged In: YES
    user_id=210714
    Originator: NO

    Maybe it would be more simple to just go back to main.php in all cases?

     
  • Marc Delisle

    Marc Delisle - 2008-01-12
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB