xref: /PHP-8.2/ext/sqlite3/tests/bug81742.phpt (revision 2f6b9e6c)
1--TEST--
2Bug #81742 (open_basedir bypass in SQLite3 by using url encoded file)
3--EXTENSIONS--
4sqlite3
5--INI--
6open_basedir=.
7--FILE--
8<?php
9$db = new SQLite3(':memory:');
10$db->query("ATTACH 'file:..%2ffoo.php' as db2;");
11?>
12--EXPECTF--
13Warning: SQLite3::query(): not authorized in %s on line %d
14