Skip to content

Commit

Permalink
Removed BinaryFormatter
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jbarrantes committed Oct 21, 2024
1 parent 40b4d25 commit 0cda4c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
6 changes: 3 additions & 3 deletions SnowflakePS/SnowflakePS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
<AssemblyName>SnowflakePS</AssemblyName>
<RootNamespace>Snowflake.Powershell</RootNamespace>

<Version>2024.10.8.0</Version>
<FileVersion>2024.10.8.0</FileVersion>
<AssemblyVersion>2024.10.8.0</AssemblyVersion>
<Version>2024.10.21.0</Version>
<FileVersion>2024.10.21.0</FileVersion>
<AssemblyVersion>2024.10.21.0</AssemblyVersion>
<Authors>Daniel Odievich, Ryan Bacastow, Michael Ybarra</Authors>
<Company>Snowflake Computing</Company>
<Product>Snowflake Snowsight Extensions</Product>
Expand Down
2 changes: 1 addition & 1 deletion SnowflakePS/SnowflakePS.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
RootModule = 'SnowflakePS.dll'

# Version number of this module.
ModuleVersion = '2024.10.8.0'
ModuleVersion = '2024.10.21.0'

# Supported PSEditions
# CompatiblePSEditions = @()
Expand Down
22 changes: 7 additions & 15 deletions SnowflakePS/UtilityDrivers/SnowflakeDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,13 @@ public static string GetSSOLoginLinkForAccountAndUser(string accountUrl, string
public static Tuple<string, CookieContainer, HttpStatusCode> GetOrganizationAndUserContext(AppUserContext authContext)
{

using(MemoryStream stream = new MemoryStream())
{
BinaryFormatter formatter = new BinaryFormatter();
formatter.Serialize(stream, authContext.Cookies);
stream.Seek(0, SeekOrigin.Begin);
CookieContainer cookies = (CookieContainer)formatter.Deserialize(stream);

return apiGET(
authContext.AppServerUrl,
"bootstrap",
snowflakeContext: authContext.ContextUserNameUrl,
referer: String.Format("{0}/", authContext.MainAppUrl),
cookies: cookies
);
}
return apiGET(
authContext.AppServerUrl,
"bootstrap",
snowflakeContext: authContext.ContextUserNameUrl,
referer: String.Format("{0}/", authContext.MainAppUrl),
cookies: authContext.Cookies
);
}

#endregion
Expand Down

0 comments on commit 0cda4c2

Please sign in to comment.