-
Notifications
You must be signed in to change notification settings - Fork 30
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
Some minor bugfixes for newinternal #285
Conversation
stwalkerster
commented
Jan 29, 2017
- Use constants instead of magic strings for user status
- Add a provision to allow extra CSS and JS resources to be loaded on a page-by-page basis
- Fix unhandled exception in IndentificationVerifier
- Refactor and expand capabilities of SearchHelper
We still need a better way of doing this.
Previously doing a full table scan which was executing in about 660ms, now taking about 10ms.
This has the effect of ensuring that requests have their data preserved for as long as they are open. With this patch, closed requests will have their data cleared once they become older than 14 days; if a request has been open for longer than 14 days, that request's private data will be purged "immediately" upon close - more specifically, on the next run of the dataclear script after the request is closed. We may wish to modify this so that requests' private data is purged 14 days after the request is closed, whenever that is, regardless of how old the request was when it was closed. This would be, of course, pending WMF approval, and I'll also port this patch to newinternal once we've finalized the approach to take.
This specific exclusion won't work in the future, and needs to be adjusted to account for roles. This isn't critical for the general change though, and can be handled at a later time.
This is now rethrown as an EnvironmentException, as it's likely a network issue - for example, the database server and web server are on a tablet in an aircraft at 30,000 feet...
Don't group users, but show them with their roles.
* remove some search methods from the User class * fix StatsInactiveUsers from previous breakage
(depends on #284 ) |
# Conflicts: # includes/DataObjects/User.php # templates/header-internal.tpl
# Conflicts: # includes/DataObjects/User.php
Since I don't know enough about some of the testing stuff, I am going to add this checklist so FL4 knows which part still need review.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IdentificationVerifier.php#L37 specifies API params. Throwing them in the sandbox at meta, throws me back this:
{ "batchcomplete": "", "query": { "normalized": [ { "from": "Access_to_nonpublic_information_policy/Noticeboard", "to": "Access to nonpublic information policy/Noticeboard" } ], "pages": { "-1": { "ns": 0, "title": "Access to nonpublic information policy/Noticeboard", "missing": "" } } } }
That doesn't seem to be the expected output.
Is there any way in which the changes in includes/Tasks/PageBase.php could have something injected by cookie, or user set setting? I'm asking more than looking because I don't know all the pages to look at. Update: I do see templates/base.tpl which requires the js/css to come from our tool, I'm just worried there is still a way through dns/request modification that it could be screwed with. |
I have finished reviewing what I am comfortable reviewing. |
Yeah, this needs to be updated to the new location of the noticeboard, and to account for the identification versioning change I put into master three months ago. If that's the only issue you can see with it, I'm tempted to ignore it just now and fix it as part of the merge of changes from master. |
Yeah, DNS poisoning is possible, for which we could start using nonces and SRI (both of which have more widespread implementations now), but this is a more global issue than just with this bit of code, which I think I'll want to address in a new PR. I think there probably is some tidy-up needed around both the In truth, those functions shouldn't be in this PR; they're not used yet; and neither is the |
Well oops, forgot there was a new one. |
While I have approved, this should get @FastLizard4 to sign off on the rest or @stwalkerster can repoke me to help me understand the other files |
@dqwiki, here's a but of a rundown of what the changes here are. Some of the ones you've checked off in your list above I've not mentioned, as I assume you're happy with what they're doing. .travis.phplint.sh, .travis.yml, and codecov.ymlThese are configuration files and a shell script used as part of the Travis CI builds. It's not part of the software itself, but part of the tooling surrounding the codereview process. includes/ConsoleTasks/ClearOldDataTask.phpThis is the reimplementation of the datapurge script; specifically this change is the newinternal implementation of 27d56cb from the master branch includes/IdentificationVerifier.phpRequires a fix, but not in this PR. I've opened #509 for this in the "blocking newinternal" column in the project. Search helpers:
|
Ok, everything has been signed off now. |