smarty template cache path exceeding maximum lenght
- Status
- Pending
- Subject
- smarty template cache path exceeding maximum lenght
- Version
- 1.9.x
- Category
- Error
- Feature
- Menu
Performance / Speed / Load / Compression / Cache
Templates (Smarty)
User Administration (Registration, Login & Banning) - Resolution status
- Please retest
- Submitted by
- CAPSLOCK2000
- Lastmod by
- Marc Laporte
- Rating
- Description
The ID generated by get_user_cache_id is used to create a new directory in templates_c/ . This ID is generated by concatenating all the groups a user is in.
When a user is in many groups the ID exceeds the maximum filename length of my system (FreeBSD 4.11).- Solution
I fixed it by hashing the ID down with md5 before returning.
I don't know if md5 is the optimal hash function in this place. I chose it mostly because it is stanard and reasonably fast. Perhaps crc32 or sha1 or better, but I don't know enough about hashes to make an informed decission.
tikilib.php.old Mon Oct 17 14:40:17 2005 +++ tikilib.php Wed Nov 9 11:37:16 2005@@ -1270,7 +1270,7 @@
+ return md5($cacheId);
// in this case user get permissions from no group
$cacheId = 'ADMIN:'.$cacheId;
}
- return $cacheId;}
- Importance
- 2
- Priority
- 10
- Demonstrate Bug on Tiki 19+
-
This bug has been demonstrated on show2.tiki.org
Please demonstrate your bug on show2.tiki.org
- Demonstrate Bug (older Tiki versions)
-
This bug has been demonstrated on show.tikiwiki.org
Please demonstrate your bug on show.tikiwiki.org
Show.tiki.org is currently unavailableUnable to connect to show.tikiwiki.org. Please let us know of the problem so that we can do something about it. Thanks.
- Ticket ID
- 408
- Created
- Wednesday 09 November, 2005 10:47:38 UTC
by Unknown - LastModif
- Thursday 30 September, 2021 13:24:32 UTC