Merge pull request #2560 from ImranR98/dev

Stop sending GitHub token if a "hubproxy" instance is in use
This commit is contained in:
Imran
2025-09-27 02:53:42 -04:00
committed by GitHub
3 changed files with 10 additions and 6 deletions

View File

@@ -53,11 +53,12 @@ class GitHub extends AppSource {
additionalValidators: [ additionalValidators: [
(value) { (value) {
try { try {
if (Uri.parse( if (value != null && Uri.parse(value).scheme.isNotEmpty) {
'https://${value}/api.github.com',
).scheme.isNotEmpty) {
throw true; throw true;
} }
if (value != null) {
Uri.parse('https://${value}/api.github.com');
}
} catch (e) { } catch (e) {
return tr('invalidInput'); return tr('invalidInput');
} }
@@ -288,6 +289,9 @@ class GitHub extends AppSource {
settingsProvider, settingsProvider,
); );
String? creds = sourceConfig['github-creds']; String? creds = sourceConfig['github-creds'];
if ((additionalSettings['GHReqPrefix'] as String? ?? '').isNotEmpty) {
creds = null;
}
if (creds != null) { if (creds != null) {
var userNameEndIndex = creds.indexOf(':'); var userNameEndIndex = creds.indexOf(':');
if (userNameEndIndex > 0) { if (userNameEndIndex > 0) {

View File

@@ -852,10 +852,10 @@ packages:
dependency: transitive dependency: transitive
description: description:
name: shared_preferences_android name: shared_preferences_android
sha256: a2608114b1ffdcbc9c120eb71a0e207c71da56202852d4aab8a5e30a82269e74 sha256: bd14436108211b0d4ee5038689a56d4ae3620fd72fd6036e113bf1345bc74d9e
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.4.12" version: "2.4.13"
shared_preferences_foundation: shared_preferences_foundation:
dependency: transitive dependency: transitive
description: 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 # 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 # 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. # of the product and file versions while build-number is used as the build suffix.
version: 1.2.5+2321 version: 1.2.6+2322
environment: environment:
sdk: ^3.8.1 sdk: ^3.8.1