expo-clipboard 4.8.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 5.0.0 — 2023-12-12
|
|
14
|
+
|
|
15
|
+
### 🐛 Bug fixes
|
|
16
|
+
|
|
17
|
+
- [Android] Fix path traversal vulnerability in `getFileForUri` function. ([#25549](https://github.com/expo/expo/pull/25549) by [@behenate](https://github.com/behenate))
|
|
18
|
+
|
|
13
19
|
## 4.8.0 — 2023-11-14
|
|
14
20
|
|
|
15
21
|
### 🛠 Breaking changes
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '
|
|
6
|
+
version = '5.0.0'
|
|
7
7
|
|
|
8
8
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
9
9
|
if (expoModulesCorePlugin.exists()) {
|
|
@@ -94,7 +94,7 @@ android {
|
|
|
94
94
|
namespace "expo.modules.clipboard"
|
|
95
95
|
defaultConfig {
|
|
96
96
|
versionCode 3
|
|
97
|
-
versionName '
|
|
97
|
+
versionName '5.0.0'
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
@@ -348,7 +348,7 @@ class ClipboardFileProvider : ContentProvider() {
|
|
|
348
348
|
} catch (e: IOException) {
|
|
349
349
|
throw java.lang.IllegalArgumentException("Failed to resolve canonical path for $file")
|
|
350
350
|
}
|
|
351
|
-
if (!file.
|
|
351
|
+
if (!file.startsWith(root)) {
|
|
352
352
|
throw SecurityException("Resolved path jumped beyond configured root")
|
|
353
353
|
}
|
|
354
354
|
return file
|
|
@@ -6,7 +6,7 @@ import UIKit
|
|
|
6
6
|
import MobileCoreServices
|
|
7
7
|
|
|
8
8
|
class ClipboardModuleSpec: ExpoSpec {
|
|
9
|
-
override func spec() {
|
|
9
|
+
override class func spec() {
|
|
10
10
|
let appContext = AppContext.create()
|
|
11
11
|
let holder = ModuleHolder(appContext: appContext, module: ClipboardModule(appContext: appContext))
|
|
12
12
|
|
|
@@ -24,7 +24,9 @@ class ClipboardModuleSpec: ExpoSpec {
|
|
|
24
24
|
func expectModuleFunctionThrows<T>(_ functionName: String, args: [Any], exception: T.Type) where T: Exception {
|
|
25
25
|
waitUntil(timeout: .seconds(3)) { done in
|
|
26
26
|
holder.call(function: functionName, args: args) { result in
|
|
27
|
-
expect(result).to(beFailure
|
|
27
|
+
expect(result).to(beFailure { error in
|
|
28
|
+
expect(error.rootCause is T).to(beTrue())
|
|
29
|
+
})
|
|
28
30
|
done()
|
|
29
31
|
}
|
|
30
32
|
}
|
|
@@ -304,16 +306,3 @@ class ClipboardModuleSpec: ExpoSpec {
|
|
|
304
306
|
}
|
|
305
307
|
}
|
|
306
308
|
}
|
|
307
|
-
|
|
308
|
-
// TODO: (barthap) Replace this with built-in beFailure() when upgraded to Nimble 10.0
|
|
309
|
-
func beFailure<Success, Failure, T: Exception>(exception: T.Type) -> Nimble.Predicate<Result<Success, Failure>> {
|
|
310
|
-
return Predicate.simple("be \(exception)") { actualExpression in
|
|
311
|
-
guard let actual = try actualExpression.evaluate(),
|
|
312
|
-
case let .failure(error) = actual,
|
|
313
|
-
(error as? Exception)?.rootCause is T
|
|
314
|
-
else {
|
|
315
|
-
return .doesNotMatch
|
|
316
|
-
}
|
|
317
|
-
return .matches
|
|
318
|
-
}
|
|
319
|
-
}
|
|
@@ -14,7 +14,10 @@ class MockNSAttributedString: NSAttributedString {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
override var rtfData: Data? {
|
|
17
|
-
return try? self.data(
|
|
17
|
+
return try? self.data(
|
|
18
|
+
from: NSRange(location: 0, length: self.length),
|
|
19
|
+
documentAttributes: [.documentType: NSAttributedString.DocumentType.rtf]
|
|
20
|
+
)
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
override var htmlString: String? {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-clipboard",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "ExpoClipboard standalone module",
|
|
5
5
|
"main": "build/Clipboard.js",
|
|
6
6
|
"types": "build/Clipboard.d.ts",
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"jest": {
|
|
40
40
|
"preset": "expo-module-scripts/universal"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "6aca7ce098ddc667776a3d7cf612adbb985e264a"
|
|
43
43
|
}
|