• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-plugins: Commit

Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの


Commit MetaInfo

Revision560eb4eac8cfcd01c6d4b69858398d2c5d21bebb (tree)
Time2008-12-26 07:02:00
Authorkmorimatsu <kmorimatsu@1ca2...>
Commiterkmorimatsu

Log Message

NP_Mediatocu v1.0.8.1 SP1 RC6

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@766 1ca29b6e-896d-4ea0-84a5-967f57386b96

Change Summary

Incremental Difference

--- a/trunk/NP_Mediatocu/mediatocu/media.php
+++ b/trunk/NP_Mediatocu/mediatocu/media.php
@@ -26,8 +26,8 @@
2626 *
2727 */
2828
29-/* 1.0.8.1SP1RC4 2008-12-22-18:30(JP) cacher */
3029 /* 1.0.8.1SP1RC5 katsumi */
30+/* 1.0.8.1SP1RC6 2008-12-25 cacher */
3131
3232 if (!defined('_MEDIA_PHP_DEFINED')) {
3333 define('_MEDIA_PHP_DEFINED', 1);
@@ -322,7 +322,7 @@ if (postVar('targetthumb')) {
322322 T.Kosugi edit End
323323 */
324324 // $msg1 = rename($mediapath . $_POST[targetfile], $mediapath . htmlspecialchars($_POST[newname]) );
325- $msg1 = media_rename($mediapath, postVar('targetfile'), htmlspecialchars(postVar('newname')) );
325+ $msg1 = media_rename($mediapath, postVar('targetfile'), htmlspecialchars($newfilename) );
326326 if (!$msg1) {
327327 print htmlspecialchars(postVar('targetfile') . _MEDIA_PHP_10);
328328 }
@@ -332,7 +332,7 @@ if (postVar('targetthumb')) {
332332 //print "targetthumb=$mediapath$_POST[targetthumb]<BR />";
333333 if ($exist) {
334334 // $thumbnewname = $Prefix_thumb . $_POST[newname];
335- $thumbnewname = $Prefix_thumb . postVar('newname');
335+ $thumbnewname = $Prefix_thumb . $newfilename;
336336 // $msg2 = rename($mediapath . $_POST[targetthumb], $mediapath . $thumbnewname);
337337 $msg2 = media_rename($mediapath, postVar('targetthumb'), $thumbnewname);
338338 if (!$msg2) {
@@ -801,7 +801,7 @@ function media_choose()
801801 </select>
802802 <?php } else {
803803 ?>
804- <input name="collection" type="hidden" value="<?php echo htmlspecialchars($currentCollection)?>" />
804+ <input name="collection" type="hidden" value="<?php echo htmlspecialchars($currentCollection); ?>" />
805805 <?php } // if sizeof
806806 ?>
807807 <br /><br />
@@ -887,6 +887,9 @@ function media_upload()
887887 $filename = strftime("%Y%m%d-", time()) . $filename;
888888 }
889889
890+ // Filename should not contain '/' or '\'.
891+ if (preg_match('#(/|\\\\)#',$filename)) media_doError(_ERROR_DISALLOWED);
892+
890893 $collection = media_requestVar('collection');
891894 $res = MEDIA::addMediaObject($collection, $filetempname, $filename);
892895
Show on old repository browser