Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freeRASP 6.13.0 #160

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [6.13.0] - 2025-03-04

- iOS SDK version: 6.8.0
- Android SDK version: 14.0.1

### Flutter

#### Fixed
- ARN issue when application launched when recording active
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- ARN issue when application launched when recording active
- ANR issue when application is launched during screen recording


## [6.12.0] - 2025-02-18

- iOS SDK version: 6.8.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,16 @@ import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter
/** FreeraspPlugin */
class FreeraspPlugin : FlutterPlugin, ActivityAware, LifecycleEventObserver {
private var streamHandler: StreamHandler = StreamHandler()
private var methodCallHandler: MethodCallHandler = MethodCallHandler()
private var screenProtector: ScreenProtector? =
if (Build.VERSION.SDK_INT >= 34) ScreenProtector() else null
private var methodCallHandler: MethodCallHandler = MethodCallHandler(screenProtector)

private var context: Context? = null
private var lifecycle: Lifecycle? = null

override fun onAttachedToEngine(flutterPluginBinding: FlutterPlugin.FlutterPluginBinding) {
val messenger = flutterPluginBinding.binaryMessenger
context = flutterPluginBinding.applicationContext
screenProtector?.enable()
methodCallHandler.createMethodChannel(messenger, flutterPluginBinding.applicationContext)
streamHandler.createEventChannel(messenger)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ internal class ScreenProtector : DefaultLifecycleObserver {
internal fun enable() {
if (isEnabled) return
isEnabled = true
activity?.let { register(it) }
}

override fun onStart(owner: LifecycleOwner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,10 @@ import android.os.Looper
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.LifecycleOwner
import com.aheaditec.freerasp.runResultCatching
import com.aheaditec.freerasp.ScreenProtector
import com.aheaditec.freerasp.Utils
import com.aheaditec.freerasp.generated.TalsecPigeonApi
import com.aheaditec.freerasp.runResultCatching
import com.aheaditec.freerasp.toPigeon
import com.aheaditec.talsec_security.security.api.SuspiciousAppInfo
import com.aheaditec.talsec_security.security.api.Talsec
Expand All @@ -23,7 +24,8 @@ import io.flutter.plugin.common.MethodChannel.MethodCallHandler
/**
* A method handler that creates and manages an [MethodChannel] for freeRASP methods.
*/
internal class MethodCallHandler : MethodCallHandler, LifecycleEventObserver {
internal class MethodCallHandler(private val screenProtector: ScreenProtector?) : MethodCallHandler,
LifecycleEventObserver {
private var context: Context? = null
private var methodChannel: MethodChannel? = null
private var pigeonApi: TalsecPigeonApi? = null
Expand Down Expand Up @@ -137,6 +139,7 @@ internal class MethodCallHandler : MethodCallHandler, LifecycleEventObserver {
val talsecConfig = Utils.toTalsecConfigThrowing(config)
context?.let {
TalsecThreatHandler.start(it, talsecConfig)
screenProtector?.enable()
} ?: throw IllegalStateException("Unable to run Talsec - context is null")
result.success(null)
}
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: freerasp
description: Flutter library for improving app security and threat monitoring on Android and iOS mobile devices. Learn more about provided features on the freeRASP's homepage first.
version: 6.12.0
version: 6.13.0
homepage: https://www.talsec.app/freerasp-in-app-protection-security-talsec
repository: https://github.com/talsec/Free-RASP-Flutter

Expand Down