File tree 2 files changed +8
-2
lines changed
module-code/app/securesocial/core/services
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
master -
2
+ - Recover to None if an authenticator builder fails
2
3
- Fixed #601: Security: password reset email host injection
3
4
3.0-M6 - 2017-02-17
4
5
- Upgraded to Play 2.5.12
Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ import scala.reflect.ClassTag
23
23
import org .apache .commons .lang3 .reflect .TypeUtils
24
24
25
25
class AuthenticatorService [U ](builders : AuthenticatorBuilder [U ]* )(implicit val executionContext : ExecutionContext ) {
26
- val asMap = builders.map { builder => builder.id -> builder }.toMap
26
+ private val logger = play.api.Logger (getClass.getName)
27
+ private val asMap = builders.map { builder => builder.id -> builder }.toMap
27
28
28
29
def find (id : String ): Option [AuthenticatorBuilder [U ]] = {
29
30
asMap.get(id)
@@ -46,6 +47,10 @@ class AuthenticatorService[U](builders: AuthenticatorBuilder[U]*)(implicit val e
46
47
}
47
48
}
48
49
}
49
- iterateIt(builders)
50
+ iterateIt(builders) recover {
51
+ case t : Throwable =>
52
+ logger.error(s " An error occurred while trying to build an authenticator from a request " , t)
53
+ None
54
+ }
50
55
}
51
56
}
You can’t perform that action at this time.
0 commit comments