Commits

Christoffer Niska  committed 436eb80

Fixed the rewrite regex.

  • Participants
  • Parent commits 574e837

Comments (0)

Files changed (1)

File components/ImgInstaller.php

 	public function init()
 	{
 		$this->_imagePath=Yii::app()->image->imagePath;
-		$this->_basePath=realpath( Yii::app()->basePath.'/../' ).'/';
+		$this->_basePath=realpath(Yii::app()->basePath.'/../').'/';
 	}
 
 	/**
 		// Replace the placeholders in the template file.
 		$htaccess=strtr($htaccess,array(
 			'{baseUrl}'=>Yii::app()->getRequest()->getBaseUrl().'/',
-			'{sourceUrl}'=>'^versions/([\w\d]+)/[\w\d]+\-([\d]+)\.(gif|jpg|png)$',
+			'{sourceUrl}'=>'^versions/([^\<\>:"/\\\|\?\*]+)/[^\<\>:"/\\\|\?\*]+\-([0-9]+)\.(gif|jpg|png)$',
 			'{targetUrl}'=>$targetUrl,
 		));