-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add upgrade check #3095
Add upgrade check #3095
Conversation
@kghbln FYI Just came across the issue during an API request on a different test wiki where I forgot to run the
|
Just as a note, the setting is only to be used by the project, a normal user should not override or manipulate the setting! |
Indeed. |
…ted DB writes (transaction from ...", refs #3095 [skip ci]
…ted DB writes (transaction from ...", refs #3095 [skip ci]
Isn't it better to rename the upgrade_key field in to upgrade_hash in .smw.json, since it doesn't contain security information? I'm asking this because I was a bit confused whether or not to disallow public access to this file. |
I'm not sure whether changing the name would invertible imply security or not while the name itself is a key for the upgrade and contains a sha1. In case it makes a difference to some, feel free to send a PR that introduces a different field name but you have to ensure that you provide a migration in [0] to avoid invaliding previous information.
I'd say that you should apply the same policy as for the your [0] https://github.com/SemanticMediaWiki/SemanticMediaWiki/blob/master/src/SetupFile.php |
I think this is a matter of documenting. I see the point but I do not think it is important enough if docu exists. EDIT: I added a note |
This PR is made in reference to: #
This PR addresses or contains:
update.php
orsetupStore.php
and in order to do that we introducesmwgUpgradeKey
which contains an arbitrary identifier that is used to validate the status by comparing the local result of.smw.json
against the upgrade key..smw.json
doesn't exist or contains an invalid key then the system stops before it can access any data or tables and shows a message to the user such as: "Error: The Semantic MediaWiki extension was enabled but the installation is incomplete ...".This PR includes:
Fixes #