Skip to content
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

Empty (or invalid) dataValue in InTextAnnotationParser creates property reference #1217

Closed
mwjames opened this issue Oct 16, 2015 · 2 comments

Comments

@mwjames
Copy link
Contributor

mwjames commented Oct 16, 2015

[0] shows that despite being empty (with an error message) [[EmptyDataValueCreatesProperty:: ]] still creates a property reference entry in the ID_TABLE [1].

The issue is to check for validity:

-           if ( $this->isEnabledNamespace && $this->isAnnotation ) {
+           if ( $dataValue->isValid() && $this->isEnabledNamespace && $this->isAnnotation ) {
                $this->parserData->addDataValue( $dataValue );
            }

[0] http://sandbox.semantic-mediawiki.org/wiki/EmptyDataValueCreatesProperty

[1] http://sandbox.semantic-mediawiki.org/w/index.php?title=Special%3AProperties&property=EmptyDataValueCreatesProperty

@mwjames mwjames added the bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error label Oct 16, 2015
@mwjames
Copy link
Contributor Author

mwjames commented Oct 16, 2015

-           if ( $this->isEnabledNamespace && $this->isAnnotation ) {
+           if ( $dataValue->isValid() && $this->isEnabledNamespace && $this->isAnnotation ) {
                $this->parserData->addDataValue( $dataValue );
            }

If we check for $dataValue->isValid() as mentioned above then of course we loose the ability to filter on Has improper value for as an invalid DataValue which creates an error annotation with reference to the property that caused the issue.

image

@mwjames mwjames added discussion and removed bug Occurrence of an unintended or unanticipated behaviour that causes a vulnerability or fatal error labels Oct 16, 2015
@mwjames
Copy link
Contributor Author

mwjames commented Oct 16, 2015

Instead of changing the InTextAnnotationParser behaviour we keep the workflow as-is and rely on the post-processing (#1216) to remove outdated references.

@mwjames mwjames closed this as completed Oct 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant