We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebc0605 commit 8648d7eCopy full SHA for 8648d7e
lib/active_record/connection_adapters/sqlserver_adapter.rb
@@ -213,6 +213,7 @@ def binary_to_string(value)
213
# Check if the value actually is hex output from the database
214
# or an Active Record attribute that was just written. If hex, pack the hex
215
# characters into a string, otherwise return the value
216
+ # TODO: This conversion is asymmetrical, and could corrupt data if the original data looked like hex. We need to avoid the guesswork
217
value =~ /[^[:xdigit:]]/ ? value : [value].pack('H*')
218
end
219
0 commit comments