“Kleine Ursache, große Wirkung” passt bei dieser Konfigurationseinstellung ziemlich genau. Ist sie nicht gesetzt, werden bei allen gecachten Seiten die eventuell vorhandenen “set-cookie” Parameter in den Headern mit in den Cache abgelegt. Das kann fatale Folgen haben, wenn z.B. eine JSESSIONID als Cookie gesetzt wird. Wird dann eine Seite mit dem “set-cookie” aus dem Cache geladen, überschreibt diese JSESSIONID die aktuell vorhandene. Da die gecachte JSESSIONID aber einem ganz anderen Benutzer gehören könnte, ist es nun möglich, dessen Session zu übernehmen. Natürlich nur, falls dessen Session noch aktiv ist. Wenn nicht, dann gibt es zumindest einen ungewollten SessionTimedOut Fehler. Die Symptome treten allerdings auch nicht immer und nicht immer bei allen gecachten Inhalten auf, so dass der Fehler schwer reproduzierbar und auffindbar ist.
Apache mod_cache verursacht damit also ungewolltes “Session Hijacking”.
Abhilfe schafft das Setzen von “CacheIgnoreHeaders Set-Cookie”. Jeder, der mod_cache im Einsatz hat, sollte seine Konfiguration dahingehend prüfen wie diese Einstellung gesetzt ist und ob das so ausreichend ist.
You may have some recurring development tasks while your daily work with java in different projects. For example you again and again write some small code that capitalizes a given String. Or you write an application with a command line interface and write code that defines and parses your command line options. Or you need some little helpers for your database handling. Or …
These are only some examples and if you don’t have already written and built your own little libraries for those tasks, you may want to have a look at Apache Commons, formerly known as Jakarta Commons. There are libraries for everyday use in different packages.
I will provide you a short overview over Apache Commons here and write some more articles about some of their libraries in the next weeks.
So, Apache Commons assign their libraries to three repositories depending on their development stage and usage (list taken from their site):
- The Commons Proper – A repository of reusable Java components.
- The Commons Sandbox – A workspace for Java component development.
- The Commons Dormant – A repository of Sandbox components that are currently inactive.
I will focus on Commons Proper in this and my following articles since the contained components are ready to use and stable.
Currently, Commons Proper contains 39 components. You can categorize them into web, xml, utilities, converters and Java API extension.
The following table is taken and translated from german Wikipedia:
| Category |
Components |
| Web |
FileUpload, Net, EL, Email, Jexl |
| XML |
Betwixt, Digester, Jelly, JXPath |
| Utilities |
BeanUtils, Pool, Validator, Daemon, Discovery, Exec, Launcher, JCI, Jelly, Modeler, SCXML, Chain |
| Converters |
Codec, Compress |
| Java API Extensions |
Lang, Collections, IO, Logging, Configuration, DBCP, DbUtils, Math, Primitives, Proxy, Validator, VFS, Attributes, CLI, Discovery, Transaction |
Recent Comments