-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fork #15
base: teleport.1
Are you sure you want to change the base?
Update fork #15
Conversation
* refactor!: enable hidden admin protocol * feat: admin protocol * fix admin test to skip in appveyor * fix protocol parsing logic in URL() * use SplitN * handle ipv6 in URL() * Update docs for v1.0 tag BREAKING CHANGE: Add `Hidden()` method to `ProtocolParser` interface
* go mod vendor npipe to this repo * switch to internal package
* fix: mips and mipsel builds fixes: denisenkom#123 * swap el or le
* Allow for local dns resolution with a custom dialer * Use a new dialer type * fix unit test * Add changelog & readme
…er (denisenkom#126) * Added MarshalText() and UnmarshalJSON interfaces - The existing MarshalText() for the UniqueIdentifier type had a bad signature. It omitted returning an error that the interface expects. - Added UnmarshalJSON() interface to the UniqueIdentifier type with a test as well * use strings.Replace instead of ReplaceAll
fix: protocol version
Remove message referring to MSFT fork since we are there.
Update README.md
* Fix: Handle extended chars in SQL instance names
* add core CEK parameters and types * add column encryption featureext * Add parsing of always encrypted tokens * implement local cert key provider * use key providers for decrypt * implement EncryptColumnEncryptionKey for local cert * add cipher data to parameters * copy swisscom code locally * implement Encrypt * don't claim to support enclaves * update readme * fix Scan to use correct data types * make cert store provider go1.17+ * rename files for clarity * update dependencies and min Go version * update reviewdog * remove old SQL versions from PR build
Update title to stand out in search results.
Update README.md Title
* Feat: Implement change password during login * use -v for go test * move assert usage to go117+
Change parameters to match driver rather than sdk
This commit fixes denisenkom#136. Adds support for TDS8. TDS8 connection can now be used by specifying encrypt=strict. TrustServerCertificate=true will not come into effect when encrypt is set to 'strict'.
Add note on CLI authentication
Co-authored-by: akondratev <[email protected]>
…nisenkom#155) * Add context parameter to key provider interface * update error handling for AE key providers
* FEAT:support environment config of krb5 * update readme and version * use client keytab file as default
…enisenkom#158 (denisenkom#159) * fix: Added multisubnetfailover option that can be set to false to prevent issue denisenkom#158
* Fix mappings between LCIDs and code pages. * Add test for fetching various LCIDs. * Address Github automation feedback. * Refine comments. --------- Co-authored-by: Sergey Ten <[email protected]>
* Reserve extra space for out parameter + tests. * Test for []byte parameter. --------- Co-authored-by: El-76 <[email protected]>
* lazy initialization of charset maps * initialize each charsetmap separately * switch from init to get
* Update dependencies * support dataverse endpoint
* Refactor UniqueIdentifier tests * Parallelize tests * Add NullableUniqueIdentifier type * Add missing test case for UniqueIdentifier * Improve error message * Rename to NullUniqueIdentifier * Add NullUniqueIdentifier to TestBulkcopy * Add uniqueidentifier parsing to the list of Features * Add Valid bool to NullUniqueIdentifier * Handle null in UnmarshalJSON() * Handle !Valid in Value(),String(),MarshalText() --------- Co-authored-by: Norman Gehrsitz <[email protected]>
* preserve type information for Valuer parameters * support uniqueidentifier in AE * update readme
* Fix:Enable connection to WID
* fix: support nullable types for bulkcopy * Add test cases for all nullable types * Fix test cases * Add bulkcopy test for invalid nullable types * Add case in convertInputParameter to bypass uniqueidentifier type * Add test cases for invalid nullable test * Revert bypass change
* handle sql.NullTime parameters * Match SQL sizes for sql.Nullxxx integer types * handle custom nullable Valuer implementations
* Vulnerabilty depency x/net * Att Dependencies
* Accept hierarchyid as a valid type * error * derp * geography and geometry * Return value * Tests * Typo * Upper * hasSize
…rado/update-library-microsoft
if err != nil { | ||
panic(err) | ||
} | ||
bytes[i] = byte(b) |
Check failure
Code scanning / CodeQL
Incorrect conversion between integer types High
strconv.ParseInt
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI 3 months ago
To fix the problem, we need to ensure that the value parsed by strconv.ParseInt
is within the range of a byte
(0 to 255) before converting it. This can be done by adding a check to ensure the parsed value is within the valid range for a byte
. If the value is out of range, we should handle the error appropriately.
- Parse the string using
strconv.ParseInt
with a bit size of 8 to directly get an 8-bit integer. - Check if the parsed value is within the range of a
byte
(0 to 255). - If the value is within the range, convert it to a
byte
. - If the value is out of range, handle the error (e.g., by panicking or returning a default value).
-
Copy modified line R257 -
Copy modified lines R261-R263
@@ -256,3 +256,3 @@ | ||
for i := range bytes { | ||
b, err := strconv.ParseInt(thumbprint[i*2:(i*2)+2], 16, 32) | ||
b, err := strconv.ParseInt(thumbprint[i*2:(i*2)+2], 16, 8) | ||
if err != nil { | ||
@@ -260,2 +260,5 @@ | ||
} | ||
if b < 0 || b > 255 { | ||
panic(fmt.Errorf("Parsed value out of byte range: %d", b)) | ||
} | ||
bytes[i] = byte(b) |
Fetched from the Microsoft repo on 10/04 (last commit being ported) and merged to our main branch.