mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-11-29 08:56:03 +00:00
Force casting to text in case someone is using integer usernames.
This commit is contained in:
1 parent
1327fee9a8
commit
2fd4a95285
2 files changed
+4
-4
No files matched your search
+2
-2
@@ -360,9 +360,9 @@ class DAVResource
|
||||
$params[':resourcetypes'] = sprintf('<DAV::collection/><urn:ietf:params:xml:ns:caldav:%s/>', $this->collection_type );
|
||||
$sql = <<<EOSQL
|
||||
INSERT INTO collection ( user_no, parent_container, dav_name, dav_displayname, is_calendar, created, modified, dav_etag, resourcetypes )
|
||||
VALUES( (SELECT user_no FROM usr WHERE username = :username),
|
||||
VALUES( (SELECT user_no FROM usr WHERE username = text(:username)),
|
||||
:parent_container, :dav_name,
|
||||
(SELECT fullname FROM usr WHERE username = :username) || :boxname,
|
||||
(SELECT fullname FROM usr WHERE username = text(:username)) || :boxname,
|
||||
FALSE, current_timestamp, current_timestamp, '1', :resourcetypes )
|
||||
EOSQL;
|
||||
$qry = new AwlQuery( $sql, $params );
|
||||
|
||||
Reference in new issue
Block a user