It does not handle DNs ending with a comma. Such DNs are to my knowledge not valid, but could appear due to some import (I have an end entity with a such DN in my database, at least.
This affects anything that retrieves an end entity with a such broken DN from the database. For instance it breaks statedump exporting, and causes a stacktrace if you make a search in the adminweb that matches the end entity.
Setting fix version to 6.9.0 since it prevents me from doing reviews of statedump issues