Revision 7759260d pithos/backends/lib/sqlalchemy/permissions.py

b/pithos/backends/lib/sqlalchemy/permissions.py
132 132
                    self.xfeaturevals.c.value == u.c.value)
133 133
        s = select([self.xfeatures.c.path], from_obj=[inner_join]).distinct()
134 134
        if prefix:
135
            s = s.where(self.xfeatures.c.path.like(prefix + '%'))
135
            s = s.where(self.xfeatures.c.path.like(self.escape_like(prefix) + '%', escape='\\'))
136 136
        r = self.conn.execute(s)
137 137
        l = [row[0] for row in r.fetchall()]
138 138
        r.close()
......
142 142
        """Return the list of shared paths."""
143 143
        
144 144
        s = select([self.xfeatures.c.path],
145
            self.xfeatures.c.path.like(prefix + '%')).order_by(self.xfeatures.c.path.asc())
145
            self.xfeatures.c.path.like(self.escape_like(prefix) + '%', escape='\\')).order_by(self.xfeatures.c.path.asc())
146 146
        r = self.conn.execute(s)
147 147
        l = [row[0] for row in r.fetchall()]
148 148
        r.close()

Also available in: Unified diff