Skip to content
Extraits de code Groupes Projets
Valider ccf46e76 rédigé par Matthieu Napoli's avatar Matthieu Napoli
Parcourir les fichiers

#6441 Update messages + new options when updating over HTTPS fails

parent 74f0d0ff
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -48,9 +48,10 @@
"UpdateHasBeenCancelledExplanation": "Piwik One Click Update has been cancelled. If you can't fix the above error message, it is recommended that you manually update Piwik. %1$s Please check out the %2$sUpdate documentation%3$s to get started!",
"UpdateTitle": "Update",
"UpdateUsingHttpsFailed": "Downloading the latest Piwik version over secure HTTPS connection did not succeed, because of the following error:",
"UpdateUsingHttpsFailedHelp": "Please note that downloading the latest Piwik version (over secure HTTPS connection) can fail for various reasons, for example in case of network error, slow network speed, or wrong system configuration.",
"UpdateUsingHttpsFailedHelpWhatToDo": "You may continue the update via the non-secure standard HTTP connection by clicking on the button '%s'.",
"UpdateUsingHttpMessage": "Update Piwik automatically (over the non secure HTTP connection)",
"UpdateUsingHttpsFailedHelp": "Why did it fail? Downloading the latest Piwik version (over secure HTTPS connection) can fail for various reasons, for example because of a network error, slow network speed or wrong system configuration. Note that it could also mean that your server is the target of a MITM attack and someone is trying to replace the update with a malicious version of Piwik.",
"UpdateUsingHttpsFailedHelpWhatToDo": "It is recommended to retry the download using the secure HTTPS connection as it prevents MITM attacks.",
"UsingHttps": "using the secure HTTPS connection (recommended)",
"UsingHttp": "using the non-secure HTTP connection",
"UpgradeComplete": "Upgrade complete!",
"UpgradePiwik": "Upgrade Piwik",
"VerifyingUnpackedFiles": "Verifying the unpacked files",
......
{% extends '@CoreUpdater/layout.twig' %}
{% block content %}
<br/>
{% for message in feedbackMessages %}
<p>&#10003; {{ message }}</p>
{% endfor %}
{% if httpsFail %}
<br/>
<br/>
<div class="warning">
<img src="plugins/Morpheus/images/warning_medium.png"/>
{{ 'CoreUpdater_UpdateUsingHttpsFailed'|translate }}<br/>
"{{ error }}"
</div>
<p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelp'|translate }}</p>
<p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelpWhatToDo'|translate('CoreUpdater_UpdateAutomatically'|translate) }}</p>
<div class="warning">
{{ 'CoreUpdater_UpdateUsingHttpMessage'|translate }}
<form id="oneclickupdate" action="index.php">
{% for message in feedbackMessages %}
<p>&#10003; {{ message }}</p>
{% endfor %}
{% if httpsFail %}
<br/>
<br/>
<div class="warning">
<img src="plugins/Morpheus/images/warning_medium.png"/>
{{ 'CoreUpdater_UpdateUsingHttpsFailed'|translate }}<br/>
"{{ error }}"
</div>
<p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelp'|translate }}</p>
<p>{{ 'CoreUpdater_UpdateUsingHttpsFailedHelpWhatToDo'|translate }}</p>
<form action="index.php">
<input type="hidden" name="module" value="CoreUpdater"/>
<input type="hidden" name="action" value="oneClickUpdate"/>
<input type="hidden" name="https" value="1"/>
<input id="updateUsingHttps" type="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
{{ 'CoreUpdater_UsingHttps'|translate }}
</form>
<form action="index.php">
<input type="hidden" name="module" value="CoreUpdater"/>
<input type="hidden" name="action" value="oneClickUpdate"/>
<input type="hidden" name="https" value="0"/>
<input id="updateUsingHttp" type="submit" class="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
<input id="updateUsingHttp" type="submit" value="{{ 'CoreUpdater_UpdateAutomatically'|translate }}"/>
{{ 'CoreUpdater_UsingHttp'|translate }}
</form>
<form action="index.php">
<input type="submit" value="{{ 'General_ContinueToPiwik'|translate }}"/>
</form>
<br/>
{% elseif error %}
<br/>
<br/>
<div class="error">
<img src="plugins/Morpheus/images/error_medium.png"/>
{{ error }}
</div>
<br/>
<br/>
<div class="warning">
<img src="plugins/Morpheus/images/warning_medium.png"/>
{{ 'CoreUpdater_UpdateHasBeenCancelledExplanation'|translate("<br /><br />","<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/update/'>","</a>")|raw }}
</div>
<br/>
<br/>
<form action="index.php">
<input type="submit" class="submit" value="{{ 'General_ContinueToPiwik'|translate }}"/>
</form>
{% else %}
<form action="index.php">
<input type="submit" class="submit" value="{{ 'General_ContinueToPiwik'|translate }}"/>
</form>
</div>
<br/>
<br/>
{% elseif error %}
<br/>
<br/>
<div class="error">
<img src="plugins/Morpheus/images/error_medium.png"/>
{{ error }}
</div>
<br/>
<br/>
<div class="warning">
<img src="plugins/Morpheus/images/warning_medium.png"/>
{{ 'CoreUpdater_UpdateHasBeenCancelledExplanation'|translate("<br /><br />","<a target='_blank' href='?module=Proxy&action=redirect&url=http://piwik.org/docs/update/'>","</a>")|raw }}
</div>
<br/>
<br/>
{% endif %}
{% endif %}
<form action="index.php">
<input type="submit" class="submit" value="{{ 'General_ContinueToPiwik'|translate }}"/>
</form>
{% endblock %}
......@@ -20,12 +20,18 @@ describe("CoreUpdaterCode", function () {
}, done);
});
it("should offer to update over http when updating over https fails", function (done) {
it("should offer to retry using https when updating over https fails", function (done) {
expect.screenshot("httpsUpdateFail").to.be.capture(function (page) {
page.click('#updateAutomatically');
}, done);
});
it("should offer to retry over http when updating over https fails", function (done) {
expect.screenshot("httpsUpdateFail").to.be.capture(function (page) {
page.click('#updateUsingHttps');
}, done);
});
it("should show the update steps when updating over http succeeds", function (done) {
expect.screenshot("httpUpdateSuccess").to.be.capture(function (page) {
page.click('#updateUsingHttp');
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter