PHP 中巧用数组降低程序的时间复杂度
OpenX adserver version 2.8.1 and lower is vulnerable to remote code
execution. To be exploited, this vulnerability requires banner / file
upload permissions, such as granted to the 'advertiser' and
'administrator' roles.
This vulnerability is caused by the (insecure) file upload mechanism of
affected OpenX versions. These would check magic bytes of an uploaded
file to determine its MIME type, and erroneously assume this
information to be reliable. Additionally, while the file name of
uploaded files is changed, the file extension is not.
As such, it is possible to upload image files with embedded PHP code and
.php file extension. Unless PHP script execution is explicitly prevented
for the file upload location (which has not been documented in the OpenX
manual so far and it is not the result of a default installation), the
PHP code will execute as soon as HTTP access to the file location will
cause it to be executed by the web server.
To clarify, an attacker exploiting this security issue does require
prior access to OpenX, i.e. exploitation is only possible after
successful authentication. On the other hand, advertiser access is a
rather low permission level and should not allow for system access.
If these bugs were not hidden from OpenX' bug tracker, you could read up
more about issue X-5747 here:
https://developer.openx.org/jira/browse/OX/fixforversion/10910
OpenX 2.8.2 has already been released in October to fix this issue and
can be downloaded from Roll forming machine
http://www.openx.org/ad-server/download
Moritz Naumann
Naumann IT Security Consulting
Berlin, Germany
http://www.moritz-naumann.com/
相关文档:
在PHP中使用过SESSION的朋友可能会碰到这么一个问题,SESSION变量不能跨页传递。这令我苦恼了好些日子,最终通过查资料思考并解决了这个问题。我认为,出现这个问题的原因有以下几点:
1、客户端禁用了cookie
2、浏览器出现问题,暂时无法存取cookie
3、php.ini中的session.use_trans_sid = 0或者编译时没有打开--enable ......
<?php
// open database connection
@ $db = new mysqli($host, $user, $password, $database_name);
if (mysql_connect_error())
{
echo '';
exit;
}
// query
$result = $db->query($sql);
$num_results = $db->num_rows;
// data
$row = $result->fetch_assoc(); // row is array, $row['id' ......
转自本人个人网站 【PHP探路者
】,欢迎各位访问站点!
在使用PHP获取浏览器信息时,通常有两种方式:
第一种是:使用$_SERVER[HTTP_USER_AGENT]选项
此方式获取的是格式不规则的数据,如
Mozilla/4.0 (compatible; MSIE 8.0
; Windows NT 5.1; Trident/4.0; GTB6; CIBA; .NET CLR 2.0.50727)
Mozilla/5.0 (Windows ......
SQLite Tutorial in PHP
SQLite is an SQL database manager used locally or on a website, and compatible
in particularly with PHP.
Summary
Installing SQLite and creating a database
.
Installing SQLite. Verifying the installation by creating a base.
Creating and using a SQLite tabl ......