mirror of https://github.com/zlatinb/muwire
prevent invalid characters in searchers of persisted files from breaking the loading process. Related to GitHub issue #45
parent
a6eca11479
commit
e1bf6c0821
|
@ -121,8 +121,13 @@ abstract class BasePersisterService extends Service{
|
||||||
if (json.searchers != null) {
|
if (json.searchers != null) {
|
||||||
json.searchers.each {
|
json.searchers.each {
|
||||||
Persona searcher = null
|
Persona searcher = null
|
||||||
if (it.searcher != null)
|
if (it.searcher != null) {
|
||||||
searcher = new Persona(new ByteArrayInputStream(Base64.decode(it.searcher)))
|
try {
|
||||||
|
searcher = new Persona(new ByteArrayInputStream(Base64.decode(it.searcher)))
|
||||||
|
} catch (Exception ignore) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
long timestamp = it.timestamp
|
long timestamp = it.timestamp
|
||||||
String query = it.query
|
String query = it.query
|
||||||
sf.hit(searcher, timestamp, query)
|
sf.hit(searcher, timestamp, query)
|
||||||
|
|
Loading…
Reference in New Issue