Public bug reported:

Binary package hint: nautilus

Create a file with the following or similar code in it:

<?
session_start();
include('../auth.php');

$dothis=$_GET['dothis'];
$attribute=$_GET['attribute'];

echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" 
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\";>
<html>
<head>
<title>Configure Roll Call</title>
<style type='text/css'>
td.head{
        align:left;
        cursor:default;
        border:1px solid #ffffff;
}
td:hover.head{
        border:1px solid #000000;
}
</style>
</head>
<body>";
if($attribute='new-entry'){
        switch($dothis){
        }
}else{
        switch($dothis){
        }
}
echo "
</body>
</html>";
?>

Then close the file, and try to open with nautilus. You get the warning:

Cannot open file_name.php
The filename "file_name.php" indicates that this file is of type "PHP script". 
The contents of the file indicate that the file is of type "HTML document". If 
you open this file, the file might present a security risk to your system.

Etc...

The file contains html, but clearly is a php script. I believe this occurs with 
any file that contains a "<html>" tag, even including .xls 
Because the file is treated as html, the corresponding actions are altered. For 
example, opening this file in gedit with syntax highlighting turned on will 
reveal the highlighting for html is being used rather than the highlighting for 
php.

ProblemType: Bug
Architecture: i386
Date: Wed Nov 14 11:21:54 2007
DistroRelease: Ubuntu 7.10
ExecutablePath: /usr/bin/nautilus
Package: nautilus 1:2.20.0-0ubuntu7
PackageArchitecture: i386
ProcCmdline: nautilus --sm-config-prefix /nautilus-3cMRQd/ --sm-client-id 
117f000101000119453918300000051820002 --screen 0
ProcCwd: /home/josh
ProcEnviron:
 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: nautilus
Uname: Linux itbarrick 2.6.22-14-generic #1 SMP Sun Oct 14 23:05:12 GMT 2007 
i686 GNU/Linux

** Affects: nautilus (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: apport-bug

-- 
php files get classified as html
https://bugs.launchpad.net/bugs/162679
You received this bug notification because you are a member of Ubuntu
Desktop Bugs, which is a bug contact for nautilus in ubuntu.

-- 
desktop-bugs mailing list
desktop-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/desktop-bugs

Reply via email to