Compare commits

..

2 Commits

Author SHA1 Message Date
Imran Remtulla
c3c0525ab6 Upgrade Flutter + packages, increment version 2025-07-25 09:45:19 -04:00
Imran Remtulla
4680401808 Stop accidentally sharing GitHub/GitLab PATs with Codeberg, Mullvad (#2423) 2025-07-25 09:37:43 -04:00
9 changed files with 31 additions and 23 deletions

2
.gitignore vendored
View File

@@ -46,6 +46,8 @@ app.*.map.json
/android/app/profile
/android/app/release
/android/app/.cxx
/android/build/reports
/android/.kotlin
# Custom
TODO.txt

View File

@@ -3,7 +3,7 @@ import 'package:obtainium/custom_errors.dart';
import 'package:obtainium/providers/source_provider.dart';
class Codeberg extends AppSource {
GitHub gh = GitHub();
GitHub gh = GitHub(hostChanged: true);
Codeberg() {
name = 'Forgejo (Codeberg)';
hosts = ['codeberg.org'];

View File

@@ -112,13 +112,17 @@ class FDroid extends AppSource {
bool isGitHub = false;
bool isGitLab = false;
try {
GitHub().sourceSpecificStandardizeURL(details.changeLog!);
GitHub(
hostChanged: true,
).sourceSpecificStandardizeURL(details.changeLog!);
isGitHub = true;
} catch (e) {
//
}
try {
GitLab().sourceSpecificStandardizeURL(details.changeLog!);
GitLab(
hostChanged: true,
).sourceSpecificStandardizeURL(details.changeLog!);
isGitLab = true;
} catch (e) {
//

View File

@@ -13,10 +13,11 @@ import 'package:obtainium/providers/source_provider.dart';
import 'package:url_launcher/url_launcher_string.dart';
class GitHub extends AppSource {
GitHub() {
GitHub({hostChanged = false}) {
hosts = ['github.com'];
appIdInferIsOptional = true;
showReleaseDateAsVersionToggle = true;
this.hostChanged = hostChanged;
sourceConfigSettingFormItems = [
GeneratedFormTextField(

View File

@@ -12,10 +12,11 @@ import 'package:easy_localization/easy_localization.dart';
import 'package:url_launcher/url_launcher_string.dart';
class GitLab extends AppSource {
GitLab() {
GitLab({bool hostChanged = false}) {
hosts = ['gitlab.com'];
canSearch = true;
showReleaseDateAsVersionToggle = true;
this.hostChanged = hostChanged;
sourceConfigSettingFormItems = [
GeneratedFormTextField(
@@ -144,7 +145,7 @@ class GitLab extends AppSource {
Map<String, dynamic> additionalSettings,
) async {
// Prepare request params
var names = GitHub().getAppNames(standardUrl);
var names = GitHub(hostChanged: true).getAppNames(standardUrl);
String projectUriComponent =
'${Uri.encodeComponent(names.author)}%2F${Uri.encodeComponent(names.name)}';
String? PAT = await getPATIfAny(hostChanged ? additionalSettings : {});

View File

@@ -55,7 +55,7 @@ class Mullvad extends AppSource {
}
String? changeLog;
try {
changeLog = (await GitHub().getLatestAPKDetails(
changeLog = (await GitHub(hostChanged: true).getLatestAPKDetails(
'https://github.com/mullvad/mullvadvpn-app',
{'fallbackToOlderReleases': true},
)).changeLog;

View File

@@ -240,10 +240,10 @@ packages:
dependency: "direct main"
description:
name: easy_localization
sha256: "0f5239c7b8ab06c66440cfb0e9aa4b4640429c6668d5a42fe389c5de42220b12"
sha256: "2ccdf9db8fe4d9c5a75c122e6275674508fd0f0d49c827354967b8afcc56bbed"
url: "https://pub.dev"
source: hosted
version: "3.0.7+1"
version: "3.0.8"
easy_logger:
dependency: transitive
description:
@@ -341,18 +341,18 @@ packages:
dependency: transitive
description:
name: flutter_charset_detector_android
sha256: "443145e8fc8515b3b32aee375691e40dd59197a86a2ae153166bc88c8200d83b"
sha256: "617345b0f78ad56c2633ea6132e57c2e374f6970792afbe9743237f683eeae8e"
url: "https://pub.dev"
source: hosted
version: "3.0.0"
version: "3.1.1"
flutter_charset_detector_darwin:
dependency: transitive
description:
name: flutter_charset_detector_darwin
sha256: daac20390275efb92fbb14350fe11286c5e29c7b80d6b0867f52d760f0d69763
sha256: "65d91133ea8ef06a440941b1126702b4735a8bd487430b41760e706a0b6b26d4"
url: "https://pub.dev"
source: hosted
version: "1.1.0"
version: "1.2.0"
flutter_charset_detector_platform_interface:
dependency: transitive
description:
@@ -716,10 +716,10 @@ packages:
dependency: "direct main"
description:
name: permission_handler
sha256: "2d070d8684b68efb580a5997eb62f675e8a885ef0be6e754fb9ef489c177470f"
sha256: bc917da36261b00137bbc8896bf1482169cd76f866282368948f032c8c1caae1
url: "https://pub.dev"
source: hosted
version: "12.0.0+1"
version: "12.0.1"
permission_handler_android:
dependency: transitive
description:
@@ -1051,10 +1051,10 @@ packages:
dependency: "direct main"
description:
name: url_launcher
sha256: "9d06212b1362abc2f0f0d78e6f09f726608c74e3b9462e8368bb03314aa8d603"
sha256: f6a7e5c4835bb4e3026a04793a4199ca2d14c739ec378fdfe23fc8075d0439f8
url: "https://pub.dev"
source: hosted
version: "6.3.1"
version: "6.3.2"
url_launcher_android:
dependency: transitive
description:
@@ -1155,10 +1155,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_android
sha256: f6e6afef6e234801da77170f7a1847ded8450778caf2fe13979d140484be3678
sha256: "9573ad97890d199ac3ab32399aa33a5412163b37feb573eb5b0a76b35e9ffe41"
url: "https://pub.dev"
source: hosted
version: "4.7.0"
version: "4.8.2"
webview_flutter_platform_interface:
dependency: transitive
description:
@@ -1171,10 +1171,10 @@ packages:
dependency: transitive
description:
name: webview_flutter_wkwebview
sha256: a3d461fe3467014e05f3ac4962e5fdde2a4bf44c561cb53e9ae5c586600fdbc3
sha256: "71523b9048cf510cfa1fd4e0a3fa5e476a66e0884d5df51d59d5023dba237107"
url: "https://pub.dev"
source: hosted
version: "3.22.0"
version: "3.22.1"
win32:
dependency: transitive
description:

View File

@@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
version: 1.2.0+2316
version: 1.2.1+2317
environment:
sdk: ^3.8.1