Skip to content

Commit 48360c5

Browse files
author
Mark McGuill
committed
Macbox-KeePass
1 parent 31f3918 commit 48360c5

File tree

224 files changed

+5703
-2632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

224 files changed

+5703
-2632
lines changed

LICENSE.md

+661-21
Large diffs are not rendered by default.

Podfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
workspace 'StrongBox'
22

3-
target 'Strongbox' do
3+
target 'Strongbox' do'
44
project 'macbox/MacBox.xcodeproj'
55
platform :osx, '10.9'
66
use_frameworks!
@@ -21,7 +21,7 @@ pre_install do |installer|
2121
end
2222
end
2323
24-
abstract_target 'common-ios' do
24+
abstract_target 'common-ios' do'
2525
project 'Strongbox.xcodeproj'
2626
platform :ios, '9.2'
2727
use_frameworks!

Podfile.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ PODS:
2929
- GTMSessionFetcher/Full (1.2.0):
3030
- GTMSessionFetcher/Core (= 1.2.0)
3131
- GZIP (1.1.1)
32-
- ISMessages (1.2)
32+
- ISMessages (1.3.1)
3333
- JNKeychain (0.1.4)
3434
- libsodium (1.0.12)
3535
- ObjectiveDropboxOfficial (3.9.2)
@@ -106,7 +106,7 @@ SPEC CHECKSUMS:
106106
GTMOAuth2: c77fe325e4acd453837e72d91e3b5f13116857b2
107107
GTMSessionFetcher: 0c4baf0a73acd0041bf9f71ea018deedab5ea84e
108108
GZIP: f8beb59597f651e6970a45b816508a9c6d700b77
109-
ISMessages: d39098b48672813d69d30f44da06260b9920fed4
109+
ISMessages: 562cddc3e960359de95f934a4e5c4e1f4ea6fd7d
110110
JNKeychain: fb6cc9ec95959ba46cd95d0ee6f7a05e41da9f42
111111
libsodium: 9a8faa5ef2fa0d2d57bd7f7d79bf8fb7c1a9f0ea
112112
ObjectiveDropboxOfficial: aa792e0556ceb7b72955fa29a2709072f6e35fd9

README.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,16 @@ A Personal Password Manager for iOS that can be found on the Apple App Store her
33

44
https://itunes.apple.com/us/app/strongbox-password-safe/id897283731
55

6-
and you can find the home page for the app here:
7-
8-
https://strongboxsafe.com
9-
106
Strongbox supports the open source Password Safe (version 3) and KeePass file formats (KeePass 1 and 2, i.e. KDB, KDBX (3.1 and 4)). Strongbox uses open source encryption algoritms likes TwoFish, Argon2d, ChaCha20, Aes, Salsa20 and various other cryptographic techniques (SHA256s, HMACs, CSPRNGs) to store groups and entries, containing various secrets, mostly designed around password storage. You can also store File Attachments in KeePass format safes.
117

128
# Build Issues
139
The code is provided here for reasons of security, transparency and openness. Anyone can view the code and verify that everything is above board, the algorithms are correct and there are no backdoors or other malicious features present. You will need Google Drive, OneDrive and Dropbox developer accounts (with keys/secrets) before building. Familiarity with Cocoapods and other build tools is a prerequisite. Please do not file issues about build issues, I can't guarantee what is here will build in your environment. If instead of examining the code, you simply want to use the app, please download from the App Store. Lastly, if you are attempting to bypass built-in Pro/Free limitations for your own app usage, please consider your actions, and consider supporting further development by contributing via the official application (in app purchase upgrade). It will be very much appreciated.
1410

11+
# Licence Notes
12+
This software is licensed under the GNU AGPL by default. If you are interested in using the code in some other fashion, or require an alternative licence then please contact me directly: [email protected].
13+
1514
# Acknowledgements
16-
The Crypto is mostly from TomCrypt and libsodium. PasswordSafe & KeePass DB parsing/navigation/UI/Cloud interaction is my own work.
15+
The crypto is mostly from TomCrypt and libsodium. PasswordSafe & KeePass DB parsing/navigation/UI/Cloud interaction is my own work.
1716

1817
The official PasswordSafe github repository is here:
1918

StrongBox Auto Fill/CredentialProviderViewController.m

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ - (void)showSafesListView {
6565
}
6666

6767
- (BOOL)isLiveAutoFillProvider:(StorageProvider)storageProvider {
68-
return storageProvider == kiCloud || storageProvider == kGoogleDrive;
68+
return storageProvider == kiCloud;
6969
}
7070

7171
- (BOOL)isUnsupportedAutoFillProvider:(StorageProvider)storageProvider {
@@ -114,7 +114,7 @@ void showWelcomeMessageIfAppropriate(UIViewController *vc) {
114114
if(!Settings.sharedInstance.hasShownAutoFillLaunchWelcome) {
115115
Settings.sharedInstance.hasShownAutoFillLaunchWelcome = YES;
116116

117-
[Alerts info:vc title:@"Welcome to Strongbox Auto Fill" message:@"It should be noted that the following cloud providers do not support live access to your safe from App Extensions:\n\n- Dropbox\n- OneDrive\n\nIn these cases, Strongbox uses a cached local copy. Thus, there is a chance that this cache will be out of date. Please take this as a caveat. Hope you enjoy the Auto Fill extension!\n-Mark"];
117+
[Alerts info:vc title:@"Welcome to Strongbox Auto Fill" message:@"It should be noted that the following cloud providers do not support live access to your safe from App Extensions:\n\n- Dropbox\n- OneDrive\n- Google Drive\n\nIn these cases, Strongbox can use a cached local copy. Thus, there is a chance that this cache will be out of date. Please take this as a caveat. Hope you enjoy the Auto Fill extension!\n-Mark"];
118118
}
119119
}
120120

StrongBox Auto Fill/Info.plist

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<key>CFBundlePackageType</key>
1818
<string>XPC!</string>
1919
<key>CFBundleShortVersionString</key>
20-
<string>1.18.0</string>
20+
<string>1.18.1</string>
2121
<key>CFBundleURLTypes</key>
2222
<array>
2323
<dict>
@@ -30,7 +30,7 @@
3030
</dict>
3131
</array>
3232
<key>CFBundleVersion</key>
33-
<string>2618</string>
33+
<string>2619</string>
3434
<key>NSExtension</key>
3535
<dict>
3636
<key>NSExtensionMainStoryboard</key>

StrongBox Auto Fill/PickCredentialsTableViewController.m

+30-19
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,24 @@ - (void)viewDidLoad {
6969
[self smartInitializeSearch];
7070
}
7171

72+
static NSString *getSearchTermFromDomain(NSString* host) {
73+
const char *cStringUrl = [host UTF8String];
74+
75+
void *tree = loadTldTree();
76+
const char *result = getRegisteredDomainDrop(cStringUrl, tree, 1);
77+
78+
NSString *domain = [NSString stringWithCString:result encoding:NSUTF8StringEncoding];
79+
80+
NSLog(@"Calculated Domain: %@", domain);
81+
82+
NSArray<NSString*> *parts = [domain componentsSeparatedByString:@"."];
83+
84+
NSLog(@"%@", parts);
85+
86+
NSString *searchTerm = parts.count ? parts[0] : domain;
87+
return searchTerm;
88+
}
89+
7290
- (void)smartInitializeSearch {
7391
NSArray<ASCredentialServiceIdentifier *> *serviceIdentifiers = [self.rootViewController getCredentialServiceIdentifiers];
7492

@@ -80,34 +98,27 @@ - (void)smartInitializeSearch {
8098
if(serviceId) {
8199
if(serviceId.type == ASCredentialServiceIdentifierTypeURL) {
82100
NSURL* url = [NSURL URLWithString:serviceId.identifier];
83-
101+
84102
NSLog(@"URL: %@", url);
85-
void *tree = loadTldTree();
86-
87-
const char *cStringUrl = [url.host UTF8String];
88-
const char *result = getRegisteredDomainDrop(cStringUrl, tree, 1);
89-
90-
NSString *domain = [NSString stringWithCString:result encoding:NSUTF8StringEncoding];
91-
92-
NSLog(@"Calculated Domain: %@", domain);
93-
94-
NSArray<NSString*> *parts = [domain componentsSeparatedByString:@"."];
95-
96-
NSLog(@"%@", parts);
97-
98-
NSString *searchTerm = parts.count ? parts[0] : domain;
103+
104+
NSString * searchTerm = getSearchTermFromDomain(url.host);
99105

100106
self.searchController.searchBar.selectedScopeButtonIndex = 0; // Title
101107
[self.searchController.searchBar setText:searchTerm];
102108
return;
103109
}
104-
else {
105-
NSLog(@"Service Identifier Not URL: [%@]", serviceIdentifiers);
110+
else if (serviceId.type == ASCredentialServiceIdentifierTypeDomain) {
111+
NSString * searchTerm = getSearchTermFromDomain(serviceId.identifier);
112+
113+
self.searchController.searchBar.selectedScopeButtonIndex = 0;
114+
[self.searchController.searchBar setText:searchTerm];
115+
116+
return;
106117
}
107118
}
108119

109-
self.searchController.searchBar.selectedScopeButtonIndex = 0; // Title
110-
[self.searchController.searchBar setText:@""];
120+
//self.searchController.searchBar.selectedScopeButtonIndex = 0; // Title
121+
//[self.searchController.searchBar setText:@""];
111122
}
112123

113124
- (void)viewWillAppear:(BOOL)animated {
Binary file not shown.

0 commit comments

Comments
 (0)