Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: Kakao on September 28, 2008, 06:17:36 PM

Title: 2.0b4 Language Package contains illegal paths
Post by: Kakao on September 28, 2008, 06:17:36 PM
Centos 5.1 SMF 2.0Beta4

Trying to install language package Portuguese_brazilian 2.0Beta4p UTF-8 i get this message:

Package contains illegal paths - please contact Simple Machines

There is no error in the Apache error log.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Trifon on September 30, 2008, 03:38:11 AM
I got the same error while trying to install the Dutch language packs with the package manager.
But by replacing the old files using an FTP client, I didn't have any problems with upgrading (and the forum recognizes them correctly too).
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: zeroandone on September 30, 2008, 12:05:49 PM
I have the same problem.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Kakao on September 30, 2008, 07:07:02 PM
Quote from: Trifon on September 30, 2008, 03:38:11 AM
I got the same error while trying to install the Dutch language packs with the package manager.
But by replacing the old files using an FTP client, I didn't have any problems with upgrading (and the forum recognizes them correctly too).
I did copy the files and the language appears at the language config page. I checked brazilian portuguese and saved but nothing changed. Did you do something else?
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Oldiesmann on September 30, 2008, 07:56:43 PM
I did some digging to figure out what was causing this. The reason is that many language files contain an "agreement.language.txt" file, so you can have a registration agreement in another language if you want. However, SMF does not expect this file to be there, so it's throwing the error.

To fix...

Sources/ManageServer.php

Find
Code (Line 508) Select
if (strpos($file, '..') !== false || substr($file, 0, 6) != 'Themes')

Replace
if (strpos($file, '..') !== false || (substr($file, 0, 6) != 'Themes' && substr($file, 0, 10) != 'agreement'))

That should fix the problem.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Kakao on September 30, 2008, 09:14:29 PM
That worked changing
&& substr($file, 0, 10) != 'agreement'))
for
&& substr($file, 0, 9) != 'agreement'))

Than i had to logout for the new language to show.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Trifon on October 02, 2008, 07:06:57 PM
Thanks for the quick reply! ^_^
I haven't checked it out yet, but it'll be helpfull on further updates.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: mwPaul on October 02, 2008, 09:50:13 PM
I still get the error after modifying Sources/ManageServer.php. Language: Romanian.
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: Bancherd on October 04, 2008, 01:09:22 AM
Quote from: Kakao on September 30, 2008, 09:14:29 PM
That worked changing
&& substr($file, 0, 10) != 'agreement'))
for
&& substr($file, 0, 9) != 'agreement'))

Than i had to logout for the new language to show.

That worked for me, thanks! :)
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: mwPaul on October 05, 2008, 12:32:28 PM
Quote from: Kakao on September 30, 2008, 09:14:29 PM
That worked changing
&& substr($file, 0, 10) != 'agreement'))
for
&& substr($file, 0, 9) != 'agreement'))

Than i had to logout for the new language to show.
Worked for me too. Thanks!
Title: Re: 2.0b4 Language Package contains illegal paths
Post by: miguelito on November 18, 2008, 09:59:00 AM
just installed new forum.. same problem, same solution.

spanish language

Thanks.