Support

Admin Tools

#22963 Regarding ticket #16666

Posted in ‘Admin Tools for Joomla! 4 & 5’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

Joomla! version
n/a
PHP version
n/a
Admin Tools version
n/a

Latest post by on Friday, 14 August 2015 17:20 CDT

michael.hermary
In order to get image previews working in moodle (tinymce), what worked for the person in ticket #16666 didn't work for me. Instead, I had to move the following:

##### Advanced server protection rules exceptions -- BEGIN
RewriteRule ^administrator\/components\/com_akeeba\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_admintools\/restore\.php$ - [L]
RewriteRule ^administrator\/components\/com_joomlaupdate\/restore\.php$ - [L]
RewriteRule ^components\/com_joomdle\/views\/wrapper\/getout\.php$ - [L]
RewriteRule ^moodle/ - [L]
##### Advanced server protection rules exceptions -- END

...up above this part:

##### File injection protection -- BEGIN
RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [OR]
RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC]
RewriteRule .* - [F]
##### File injection protection -- END

I'm not sure if that order is how Admin Tools should be set up by default, but thought I'd let you know.

tampe125
Akeeba Staff
Hello Michael,

thanks for the report, I'll inform Nicholas about this.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

tampe125
Akeeba Staff
You should not manually edit the htaccess file: if you are going to recreate the file, all the changes you made will be lost.
The best way to handle that is to follow the instructions reported in this page of the documentation, section Allow direct access, including .php files, to these directories
If you have installed another Joomla!, WordPress, phpBB, Coppermine gallery or any other PHP application in a subdirectory of your site. For example, if you are trying to restore a copy of your site inside a directory named test in your site's root you have to add test to this list. This is the one and only usage scenario which doesn't compromise your site's security.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

michael.hermary
The issue is that when I put 'moodle' into the 'Allow direct access, including .php files, to these directories', the resulting rewrite is placed below the 'File injection protection' section of the htaccess file, which means image previews don't work in moodle (tinymce).

But if I manually move the rewrite ( RewriteRule ^moodle/ - [L] ) up above the 'File injection protection' section, all is well (I've learned that I don't have to move the other rewrites - just the moodle one).

So that's why I was saying that, at least for my setup, Admin Tools puts things in the wrong order in htaccess. The file injection projection needs to come after my moodle rewrite.

Thanks!

tampe125
Akeeba Staff
Ok, anyway, I strongly suggest you to put the custom moodle rule in the section Custom rules on top of the file: in this way you don't have to hijack Admin Tools output and you'll be able to keep the changes when you edit anything else.

Davide Tampellini

Developer and Support Staff

๐Ÿ‡ฎ๐Ÿ‡นItalian: native ๐Ÿ‡ฌ๐Ÿ‡งEnglish: good โ€ข ๐Ÿ• My time zone is Europe / Rome (UTC +1)
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

System Task
system
This ticket has been automatically closed. All tickets which have been inactive for a long time are automatically closed. If you believe that this ticket was closed in error, please contact us.

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!