diff --git a/Intrinio_Excel_Addin.xlam b/Intrinio_Excel_Addin.xlam index a175908..8fbd618 100644 Binary files a/Intrinio_Excel_Addin.xlam and b/Intrinio_Excel_Addin.xlam differ diff --git a/lib/VBA-Dictionary/.gitattributes b/lib/VBA-Dictionary/.gitattributes deleted file mode 100644 index 8e0f6e4..0000000 --- a/lib/VBA-Dictionary/.gitattributes +++ /dev/null @@ -1,16 +0,0 @@ -# CRLF -> LF by default, but not for modules or classes (especially classes) -* text=auto -*.bas text eol=crlf -*.cls text eol=crlf - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/lib/VBA-Dictionary/.gitignore b/lib/VBA-Dictionary/.gitignore deleted file mode 100644 index 9f8ec10..0000000 --- a/lib/VBA-Dictionary/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Ignore temporary Excel files -*/~$* - -# Ignore scratch work and other files -_scratch -.DS_Store \ No newline at end of file diff --git a/lib/VBA-Web/.gitattributes b/lib/VBA-Web/.gitattributes deleted file mode 100644 index 7c37d1f..0000000 --- a/lib/VBA-Web/.gitattributes +++ /dev/null @@ -1,16 +0,0 @@ -# CRLF -> LF by default, but not for modules or classes (especially classes) -* text=auto -*.bas text eol=crlf -*.cls text eol=crlf - -# Standard to msysgit -*.doc diff=astextplain -*.DOC diff=astextplain -*.docx diff=astextplain -*.DOCX diff=astextplain -*.dot diff=astextplain -*.DOT diff=astextplain -*.pdf diff=astextplain -*.PDF diff=astextplain -*.rtf diff=astextplain -*.RTF diff=astextplain diff --git a/lib/VBA-Web/.gitignore b/lib/VBA-Web/.gitignore deleted file mode 100644 index 5a174a1..0000000 --- a/lib/VBA-Web/.gitignore +++ /dev/null @@ -1,17 +0,0 @@ -# node_modules should be installed with npm install -specs/node_modules - -# Ignore temporary Excel files -~$* -*/~$* - -# Ignore credentials (don't check in sensitive data) -credentials.txt - -# Ignore scratch work and other files -_scratch -.DS_Store - -# gh-pages files -.sass-cache -_site \ No newline at end of file diff --git a/lib/VBA-Web/CHANGELOG.md b/lib/VBA-Web/CHANGELOG.md index 261e74a..f84dbd7 100644 --- a/lib/VBA-Web/CHANGELOG.md +++ b/lib/VBA-Web/CHANGELOG.md @@ -9,6 +9,8 @@ - `UrlEncodingMode.PathUrlEncoding` uses "pchar" from [RFC 3986](https://tools.ietf.org/html/rfc3986) and is the default - Update VBA-JSON to v2.2.2 - __4.1.1__ Adjust `CookieUrlEncoding` mode to match value encoding in RFC 6265 (rather than name encoding) +- __4.1.2__ Compatibility with 64-bit Mac +- __4.1.3__ Mac bugfix for % encoding # 4.0.0 diff --git a/lib/VBA-Web/README.md b/lib/VBA-Web/README.md index 73dfdc4..bc338ea 100644 --- a/lib/VBA-Web/README.md +++ b/lib/VBA-Web/README.md @@ -6,7 +6,7 @@ VBA-Web (formerly Excel-REST) makes working with complex webservices and APIs ea Getting started --------------- -- Download the [latest release (v4.1.2)](https://github.com/VBA-tools/VBA-Web/releases) +- Download the [latest release (v4.1.3)](https://github.com/VBA-tools/VBA-Web/releases) - To install/upgrade in an existing file, use `VBA-Web - Installer.xlsm` - To start from scratch in Excel, `VBA-Web - Blank.xlsm` has everything setup and ready to go diff --git a/lib/VBA-Web/VBA-Web - Blank.xlsm b/lib/VBA-Web/VBA-Web - Blank.xlsm index d770598..40be881 100644 Binary files a/lib/VBA-Web/VBA-Web - Blank.xlsm and b/lib/VBA-Web/VBA-Web - Blank.xlsm differ diff --git a/lib/VBA-Web/VBA-Web - Installer.xlsm b/lib/VBA-Web/VBA-Web - Installer.xlsm index fc6eecb..fae71e8 100644 Binary files a/lib/VBA-Web/VBA-Web - Installer.xlsm and b/lib/VBA-Web/VBA-Web - Installer.xlsm differ diff --git a/lib/VBA-Web/examples/VBA-Web - Example.xlsm b/lib/VBA-Web/examples/VBA-Web - Example.xlsm index b2c199d..0876bd3 100644 Binary files a/lib/VBA-Web/examples/VBA-Web - Example.xlsm and b/lib/VBA-Web/examples/VBA-Web - Example.xlsm differ diff --git a/lib/VBA-Web/specs/VBA-Web - Specs - Async.xlsm b/lib/VBA-Web/specs/VBA-Web - Specs - Async.xlsm index 8d8dec1..b04528a 100644 Binary files a/lib/VBA-Web/specs/VBA-Web - Specs - Async.xlsm and b/lib/VBA-Web/specs/VBA-Web - Specs - Async.xlsm differ diff --git a/lib/VBA-Web/specs/VBA-Web - Specs.xlsm b/lib/VBA-Web/specs/VBA-Web - Specs.xlsm index c1ea04c..0a94c60 100644 Binary files a/lib/VBA-Web/specs/VBA-Web - Specs.xlsm and b/lib/VBA-Web/specs/VBA-Web - Specs.xlsm differ diff --git a/lib/VBA-Web/src/IWebAuthenticator.cls b/lib/VBA-Web/src/IWebAuthenticator.cls index d609790..4481046 100644 --- a/lib/VBA-Web/src/IWebAuthenticator.cls +++ b/lib/VBA-Web/src/IWebAuthenticator.cls @@ -8,7 +8,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = True '' -' IWebAuthenticator v4.1.2 +' IWebAuthenticator v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' Interface for creating authenticators for rest client diff --git a/lib/VBA-Web/src/WebAsyncWrapper.cls b/lib/VBA-Web/src/WebAsyncWrapper.cls index 22bce7a..d5083e5 100644 --- a/lib/VBA-Web/src/WebAsyncWrapper.cls +++ b/lib/VBA-Web/src/WebAsyncWrapper.cls @@ -8,7 +8,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = True '' -' WebAsyncWrapper v4.1.2 +' WebAsyncWrapper v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' Wrapper WebClient and WebRequest that enables callback-style async requests diff --git a/lib/VBA-Web/src/WebClient.cls b/lib/VBA-Web/src/WebClient.cls index 0385e67..b0288d0 100644 --- a/lib/VBA-Web/src/WebClient.cls +++ b/lib/VBA-Web/src/WebClient.cls @@ -8,7 +8,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = True '' -' WebClient v4.1.2 +' WebClient v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' `WebClient` executes requests and handles response and is responsible for functionality shared between requests, diff --git a/lib/VBA-Web/src/WebHelpers.bas b/lib/VBA-Web/src/WebHelpers.bas index 67eb997..e8e45db 100644 --- a/lib/VBA-Web/src/WebHelpers.bas +++ b/lib/VBA-Web/src/WebHelpers.bas @@ -1,6 +1,6 @@ Attribute VB_Name = "WebHelpers" '' -' WebHelpers v4.1.2 +' WebHelpers v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' Contains general-purpose helpers that are used throughout VBA-Web. Includes: @@ -281,7 +281,7 @@ Private Declare Function web_feof Lib "libc.dylib" Alias "feof" (ByVal web_File #End If #End If -Public Const WebUserAgent As String = "VBA-Web v4.1.2 (https://github.com/VBA-tools/VBA-Web)" +Public Const WebUserAgent As String = "VBA-Web v4.1.3 (https://github.com/VBA-tools/VBA-Web)" ' @internal Public Type ShellResult @@ -1080,7 +1080,7 @@ End Function Public Function Base64Encode(Text As String) As String #If Mac Then Dim web_Command As String - web_Command = "printf " & PrepareTextForShell(Text) & " | openssl base64" + web_Command = "printf " & PrepareTextForPrintf(Text) & " | openssl base64" Base64Encode = ExecuteInShell(web_Command).Output #Else Dim web_Bytes() As Byte @@ -1699,6 +1699,43 @@ Public Function PrepareTextForShell(ByVal web_Text As String) As String PrepareTextForShell = web_Text End Function +'' +' Prepare text for using with printf command +' - Wrap in "..." +' - Replace ! with '!' (reserved in bash) +' - Escape \, `, $, and " +' - Replace % with %% (used as an argument marker in printf) +' +' @internal +' @method PrepareTextForPrintf +' @param {String} Text +' @return {String} +'' +Public Function PrepareTextForPrintf(ByVal web_Text As String) As String + ' Escape special characters (except for !) + web_Text = VBA.Replace(web_Text, "\", "\\") + web_Text = VBA.Replace(web_Text, "`", "\`") + web_Text = VBA.Replace(web_Text, "$", "\$") + web_Text = VBA.Replace(web_Text, "%", "%%") + web_Text = VBA.Replace(web_Text, """", "\""") + + ' Wrap in quotes + web_Text = """" & web_Text & """" + + ' Escape ! + web_Text = VBA.Replace(web_Text, "!", """'!'""") + + ' Guard for ! at beginning or end (""'!'"..." or "..."'!'"" -> '!'"..." or "..."'!') + If VBA.Left$(web_Text, 3) = """""'" Then + web_Text = VBA.Right$(web_Text, VBA.Len(web_Text) - 2) + End If + If VBA.Right$(web_Text, 3) = "'""""" Then + web_Text = VBA.Left$(web_Text, VBA.Len(web_Text) - 2) + End If + + PrepareTextForPrintf = web_Text +End Function + ' ============================================= ' ' 8. Cryptography ' ============================================= ' @@ -1724,7 +1761,7 @@ End Function Public Function HMACSHA1(Text As String, Secret As String, Optional Format As String = "Hex") As String #If Mac Then Dim web_Command As String - web_Command = "printf " & PrepareTextForShell(Text) & " | openssl dgst -sha1 -hmac " & PrepareTextForShell(Secret) + web_Command = "printf " & PrepareTextForPrintf(Text) & " | openssl dgst -sha1 -hmac " & PrepareTextForShell(Secret) If Format = "Base64" Then web_Command = web_Command & " -binary | openssl enc -base64" @@ -1771,7 +1808,7 @@ End Function Public Function HMACSHA256(Text As String, Secret As String, Optional Format As String = "Hex") As String #If Mac Then Dim web_Command As String - web_Command = "printf " & PrepareTextForShell(Text) & " | openssl dgst -sha256 -hmac " & PrepareTextForShell(Secret) + web_Command = "printf " & PrepareTextForPrintf(Text) & " | openssl dgst -sha256 -hmac " & PrepareTextForShell(Secret) If Format = "Base64" Then web_Command = web_Command & " -binary | openssl enc -base64" @@ -1820,7 +1857,7 @@ End Function Public Function MD5(Text As String, Optional Format As String = "Hex") As String #If Mac Then Dim web_Command As String - web_Command = "printf " & PrepareTextForShell(Text) & " | openssl dgst -md5" + web_Command = "printf " & PrepareTextForPrintf(Text) & " | openssl dgst -md5" If Format = "Base64" Then web_Command = web_Command & " -binary | openssl enc -base64" diff --git a/lib/VBA-Web/src/WebRequest.cls b/lib/VBA-Web/src/WebRequest.cls index 88b19bc..4a59542 100644 --- a/lib/VBA-Web/src/WebRequest.cls +++ b/lib/VBA-Web/src/WebRequest.cls @@ -8,7 +8,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = True '' -' WebRequest v4.1.2 +' WebRequest v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' `WebRequest` is used to create detailed requests diff --git a/lib/VBA-Web/src/WebResponse.cls b/lib/VBA-Web/src/WebResponse.cls index c5c3e75..018b7dd 100644 --- a/lib/VBA-Web/src/WebResponse.cls +++ b/lib/VBA-Web/src/WebResponse.cls @@ -8,7 +8,7 @@ Attribute VB_Creatable = False Attribute VB_PredeclaredId = False Attribute VB_Exposed = True '' -' WebResponse v4.1.2 +' WebResponse v4.1.3 ' (c) Tim Hall - https://github.com/VBA-tools/VBA-Web ' ' Wrapper for http/cURL responses that includes parsed Data based on WebRequest.ResponseFormat. diff --git a/src/Intrinio.bas b/src/Intrinio.bas index 2f0eab6..8df3f05 100644 --- a/src/Intrinio.bas +++ b/src/Intrinio.bas @@ -29,7 +29,7 @@ Private UpdatePrompt As Boolean Private APICallsAtLimit As Boolean Public Const BaseUrl = "https://api.intrinio.com" -Public Const Intrinio_Addin_Version = "2.8.0" +Public Const Intrinio_Addin_Version = "2.8.1" Public Sub IntrinioInitialize() @@ -462,7 +462,7 @@ Attribute IntrinioDataPoint.VB_ProcData.VB_Invoke_Func = " \n19" identifier = VBA.UCase(identifier) If identifier <> "" And LoginFailure = False Then - coFailure = InvalidIdentifier(identifier, item) + coFailure = InvalidIdentifier(identifier, Item) End If If identifier <> "" And LoginFailure = False And APICallsAtLimit = False And coFailure = False Then @@ -1033,7 +1033,7 @@ Attribute IHD.VB_ProcData.VB_Invoke_Func = " \n19" ticker = VBA.UCase(ticker) If ticker <> "" And LoginFailure = False And APICallsAtLimit = False Then - coFailure = InvalidIdentifier(ticker, item) + coFailure = InvalidIdentifier(ticker, Item) End If If ticker <> "" And Item <> "" And LoginFailure = False And APICallsAtLimit = False And coFailure = False Then