Skip to content

Commit

Permalink
#1317 Remove mfa capability if multifactor is disable
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed May 24, 2020
1 parent b274373 commit 465041f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion thehive/app/org/thp/thehive/services/TOTPAuthSrv.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TOTPAuthSrv(
val issuerNameConfig: ConfigItem[String, String] = appConfig.item[String]("auth.multifactor.issuer", "name of the multifactor issuer")
def issuerName: String = issuerNameConfig.get

override def capabilities: Set[AuthCapability.Value] = super.capabilities + AuthCapability.mfa
override def capabilities: Set[AuthCapability.Value] = if (enabled) super.capabilities + AuthCapability.mfa else super.capabilities

def codeIsValid(secret: String, code: Int): Boolean = {
val key = new Base32().decode(secret)
Expand Down

0 comments on commit 465041f

Please sign in to comment.