当前位置: 首页>>代码示例>>PHP>>正文


PHP PMA_checkPageValidity函数代码示例

本文整理汇总了PHP中PMA_checkPageValidity函数的典型用法代码示例。如果您正苦于以下问题:PHP PMA_checkPageValidity函数的具体用法?PHP PMA_checkPageValidity怎么用?PHP PMA_checkPageValidity使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了PMA_checkPageValidity函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testGotoNowhere

 /**
  * Test for PMA_checkPageValidity
  *
  * @param string     $page      Page
  * @param array|null $whiteList White list
  * @param int        $expected  Expected value
  *
  * @return void
  *
  * @dataProvider provider
  */
 function testGotoNowhere($page, $whiteList, $expected)
 {
     $this->assertTrue($expected === PMA_checkPageValidity($page, $whiteList));
 }
开发者ID:flash1452,项目名称:phpmyadmin,代码行数:15,代码来源:PMA_checkPageValidity_test.php

示例2: unset

 * holds page that should be displayed
 * @global string $GLOBALS['goto']
 */
$GLOBALS['goto'] = '';
// Security fix: disallow accessing serious server files via "?goto="
if (PMA_checkPageValidity($_REQUEST['goto'], $goto_whitelist)) {
    $GLOBALS['goto'] = $_REQUEST['goto'];
    $GLOBALS['url_params']['goto'] = $_REQUEST['goto'];
} else {
    unset($_REQUEST['goto'], $_GET['goto'], $_POST['goto'], $_COOKIE['goto']);
}
/**
 * returning page
 * @global string $GLOBALS['back']
 */
if (PMA_checkPageValidity($_REQUEST['back'], $goto_whitelist)) {
    $GLOBALS['back'] = $_REQUEST['back'];
} else {
    unset($_REQUEST['back'], $_GET['back'], $_POST['back'], $_COOKIE['back']);
}
/**
 * Check whether user supplied token is valid, if not remove any possibly
 * dangerous stuff from request.
 *
 * remember that some objects in the session with session_start and __wakeup()
 * could access this variables before we reach this point
 * f.e. PMA_Config: fontsize
 *
 * @todo variables should be handled by their respective owners (objects)
 * f.e. lang, server, collation_connection in PMA_Config
 */
开发者ID:mi-squared,项目名称:openemr,代码行数:31,代码来源:common.inc.php

示例3: testGotoWhitelistEncodedPage

    function testGotoWhitelistEncodedPage()
    {
        $page = 'main.php%3Fsql.php%26test%3Dtrue';

        $this->assertTrue(PMA_checkPageValidity($page, $this->goto_whitelist));
    }
开发者ID:nicokaiser,项目名称:phpmyadmin,代码行数:6,代码来源:PMA_checkPageValidity_test.php


注:本文中的PMA_checkPageValidity函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。