Skip to content
Snippets Groups Projects
  • Sybille Peters's avatar
    [BUGFIX] Fix array access error in EditableRestriction · c5a25313
    Sybille Peters authored
    The class EditableRestriction is used in EXT:linkvalidator to apply
    permission restrictions to database queries for current (non-admin)
    BE user.
    
    In case of table sys_file_reference, the value for
    $GLOBALS['TCA'][$table]['ctrl']['type'] might be "uid_local:type". In
    that case, the class EditableRestriction tried to access the TCA
    configuration for this field via $GLOBALS['TCA']['sys_file_reference']
    ['columns']['uid_local:type']['config']
    when in fact this will be empty (and the type refers to the table
    sys_file).
    
    We now check if the resulting array is empty and skip the check if
    that is the case.
    
    Resolves: #103559
    Related: #83835
    Releases: main, 12.4, 11.5
    Change-Id: Idbe653ef9f1c21c077fcb79c03212e606cc71830
    Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/84829
    
    
    Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    Tested-by: default avatarcore-ci <typo3@b13.com>
    Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
    c5a25313