Merge pull request from GHSA-mrqx-mjc4-vfh3

AnnotationController: fix improper authorization vulnerability
This commit is contained in:
Jérémy Benoist
2023-02-01 09:32:22 +01:00
committed by GitHub
6 changed files with 173 additions and 62 deletions

View File

@ -932,7 +932,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$annotationsReset = $em
->getRepository('WallabagAnnotationBundle:Annotation')
->findAnnotationsByPageId($entry->getId(), $user->getId());
->findByEntryIdAndUserId($entry->getId(), $user->getId());
$this->assertEmpty($annotationsReset, 'Annotations were reset');
@ -1040,7 +1040,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$annotationsReset = $em
->getRepository('WallabagAnnotationBundle:Annotation')
->findAnnotationsByPageId($annotationArchived->getId(), $user->getId());
->findByEntryIdAndUserId($annotationArchived->getId(), $user->getId());
$this->assertEmpty($annotationsReset, 'Annotations were reset');
}
@ -1097,7 +1097,7 @@ class ConfigControllerTest extends WallabagCoreTestCase
$annotationsReset = $em
->getRepository('WallabagAnnotationBundle:Annotation')
->findAnnotationsByPageId($entry->getId(), $user->getId());
->findByEntryIdAndUserId($entry->getId(), $user->getId());
$this->assertEmpty($annotationsReset, 'Annotations were reset');
}