diff options
Diffstat (limited to 'stoc/source/security/permissions.cxx')
-rw-r--r-- | stoc/source/security/permissions.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/stoc/source/security/permissions.cxx b/stoc/source/security/permissions.cxx index d6f0f793ef9a..21397f9a5b34 100644 --- a/stoc/source/security/permissions.cxx +++ b/stoc/source/security/permissions.cxx @@ -380,8 +380,7 @@ bool FilePermission::implies( Permission const & perm ) const if (m_url.getLength() > demanded.m_url.getLength()) return false; // check /- wildcard: all files and recursive in that path - if (1 < m_url.getLength() && - 0 == ::rtl_ustr_ascii_compare_WithLength( m_url.getStr() + m_url.getLength() - 2, 2, "/-" )) + if (m_url.endsWith("/-")) { // demanded url must start with granted path (including path trailing path sep) sal_Int32 len = m_url.getLength() -1; @@ -394,8 +393,7 @@ bool FilePermission::implies( Permission const & perm ) const #endif } // check /* wildcard: all files in that path (not recursive!) - if (1 < m_url.getLength() && - 0 == ::rtl_ustr_ascii_compare_WithLength( m_url.getStr() + m_url.getLength() - 2, 2, "/*" )) + if (m_url.endsWith("/*")) { // demanded url must start with granted path (including path trailing path sep) sal_Int32 len = m_url.getLength() -1; |