Skip to content
Merged
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
fix: Parse.serServer doesn't handle url validation
  • Loading branch information
dplewis committed Jan 28, 2025
commit c65237a777f34fb56726f002d3595b928d967d04
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,6 @@
<Test
Identifier = "ParseClientConfigurationTests/testExtensionDataSharing">
</Test>
<Test
Identifier = "ParseClientConfigurationTests/testServerValidation">
</Test>
</SkippedTests>
</TestableReference>
</Testables>
Expand Down
3 changes: 2 additions & 1 deletion Parse/Parse/Source/ParseClientConfiguration.m
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ - (void)setClientKey:(NSString *)clientKey {
}

- (void)setServer:(NSString *)server {
NSURL *url = [NSURL URLWithString:server];
PFParameterAssert(server.length, @"Server should not be `nil`.");
PFParameterAssert([NSURL URLWithString:server], @"Server should be a valid URL.");
PFParameterAssert(url && url.scheme && url.host, @"Server should be a valid URL.");
_server = [server copy];
}

Expand Down