Skip to content
Extraits de code Groupes Projets
Valider c8f11dd2 rédigé par mattab's avatar mattab
Parcourir les fichiers

Refs #3733 Installer was broken because there is not yet a token_auth during...

Refs #3733 Installer was broken because there is not yet a token_auth during installer, disabling csrf protectionif piwik is not installed
parent 8ac1bc28
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -4,5 +4,5 @@
<p class="nextStep">
<a href="index.php">{'Installation_ContinueToPiwik'|translate} &raquo;</a>
<a class="submit" href="index.php">{'Installation_ContinueToPiwik'|translate} &raquo;</a>
</p>
......@@ -48,6 +48,9 @@ h3 {
line-height:1.33;
}
#topRightBar {
float:right;top:-60px; right:10px;position:relative;
}
.error {
color:red;
font-size:100%;
......
......@@ -22,7 +22,11 @@ class Piwik_LanguagesManager_Controller extends Piwik_Controller
public function saveLanguage()
{
$language = Piwik_Common::getRequestVar('language');
$this->checkTokenInUrl();
// Prevent CSRF only when piwik is not installed yet (During install user can change language)
if(Piwik::isInstalled()) {
$this->checkTokenInUrl();
}
Piwik_LanguagesManager::setLanguageForSession($language);
if(Zend_Registry::isRegistered('access')) {
$currentUser = Piwik::getCurrentUserLogin();
......
......@@ -7,7 +7,8 @@
<option value="{$language.code}" {if $language.code == $currentLanguageCode}selected="selected"{/if} title="{$language.name} ({$language.english_name})">{$language.name}</option>
{/foreach}
</select>
<input type="hidden" name="token_auth" value="{$token_auth}"/>
{* During installation token_auth is not set *}
{if !empty($token_auth)}<input type="hidden" name="token_auth" value="{$token_auth}"/>{/if}
<input type="submit" value="go" />
</form>
</span>
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter