How to upload htm or html files? How to upload htm or html files?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

How to upload htm or html files?

Started by nico2mars, August 02, 2004, 04:42:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

nico2mars

Hello, i'm a french users of coppermine gallery.
i have just a little problem : i can't upload htm or html files and coppermine says "Extension de fichier incorrect." (in english : "wrong extension files")...
help me please!

Joachim Müller

you mustn't enable html-file upload if you allow users to upload files, as this is a high security risk. If you as admin are the only one who can upload at all, you can add html files to the list of files that are allowed to be uploaded as documents. To accomplish this, you will need a tool like phpMyAdmin or similar that let's you edit the database. With phpMyAdmin, browse the coppermine table cpgXXX_filetypes and add an entry with this content:
extension: html | mime: text/html  | content: document.
You might repeat this step with the extension "htm" as well.

I repeat: you should only enable html uploads if you have made sure that you're the only one to upload files to your coppermine page at all. Only upload html files that are known-good (that don't contain harmfull scripts and have absulte image and css paths - relative paths will display broken html pages). You have been warned!

GauGau

nico2mars


nico2mars

hello!
i have done what you said.
but now at the top of index.php :
Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38



what can i do?
thank you

Nibbler

Don't include the . at the end of document.

nico2mars

thank you now it's working!
but how can i delete the line at the top of the page :
Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: document. in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

Notice: Undefined index: in /home/dpark/www/coppermine/include/media.functions.inc.php on line 38

thank you

Casper

Have you got debug mode turned on?  Just turn it off in config, the notices should go away.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

omniscientdeveloper

#7
I don't understand how you're getting this error when my line 38 is:

mysql_free_result($result);

Did you edit something? or put your values in the wrong fields?...the latter is most likely the cause, since there isn't an index named "document", but you could get this error, if you put "document" in the extension field, on lines 33 or 35.


-omni