Page MenuHomePhabricator
Feed Advanced Search

Oct 27 2015

Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

What if backtracking, grouping, and alternatives were all disabled, and each property could have multiple format constraints, and a value would pass if it matched any of them? Most paterns would need rewriting, but only for about 18 of them would it actually be difficult.

Oct 27 2015, 10:26 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

I messed with the constraints a bit, and it would be pretty easy to get up to ~50% with the constraints you outlined (the numbers I gave before may have forgotten to skip newlines, lowering the count). Adding + and * covers 3/4, and most of the rest could be rewritten without to much trouble (other than P1793 and possibly a few others that are really basically impossible).

Oct 27 2015, 2:33 AM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints

Oct 25 2015

Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

this matches the constraints I suggested:

^(?!.*?\.(\+|\*|\{\d+,\})\()(\\.|[^()\\\[\]]|\[([^\\\[\]]|\\.)*\]|\((?!\?)(\\.|[^()\\]|\[([^\\\[\]]|\\.)*\])*\))+$
Oct 25 2015, 9:42 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

My apologies. I eliminated those in my initial analysis and forgot to mention it. The full list of things with backslashes in front of them:
bdDpsSwx2()[]{}|^\/$?+*,-.

Oct 25 2015, 9:03 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

Those criteria accept 62 (8%) of the current constraints.
Adding character classes (\d is everywhere) brings it up to 166 (23%)

Oct 25 2015, 8:28 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints

Oct 24 2015

Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

matches 624 of the ok ones, and should only match ok ones, though some will fail.

Oct 24 2015, 11:45 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

I letting things like 0?\d{8} through the filter, and most of what's left is checking file extensions. I can make them not backtrack at all if commons filenames don't contain periods (I don't know what characters are allowed). They are generally of the form .*\.(<list of extensions>)

Oct 24 2015, 10:34 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

Of those 6 properties, 2 have "optionally the same character twice", 2 have "does not start with", and the other 2 are actually non-capturing groups that I misidentified as lookarounds.

Oct 24 2015, 6:50 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints
Popcorndude added a comment to T105126: [Task] Evaluate pattern constraints (safely).

I did some analysis of what regex features are actually used: https://www.wikidata.org/wiki/User:Popcorndude/formats

Oct 24 2015, 6:16 PM · Wikibase-Quality, Performance Issue, Security-General, Wikidata, Wikibase-Quality-Constraints

Jul 29 2015

Popcorndude added a comment to T106748: [Story] Display "What statements link here" on item pages and add a Wikibase-Client function to access these statements from the 'object' item.

Maybe just load the first ~20 statements with a "Load More" button?

Jul 29 2015, 1:33 PM · Story, MediaWiki-extensions-WikibaseRepository, Wikidata