Re: Encrypt & SetHeader Length Problem

This WebDNA talk-list message is from

2000


It keeps the original formatting.
numero = 36134
interpreted = N
texte = SMSI will have to explain why the ACCOUNTNUM field takes more bare text than it does url'd encrypted text. This does, however, raise the question: Why are you encrypting in the first place?Since the cart file is located on the server and never sent to the browser (unless you specify that field for display), and you can add anything to the cart header in such a way that it never appears in the HTML source, I see no reason to use encrypt at all. I know some people have used doubly-url'd and encrypted text for storage in cookies, but here there does not seem to be any need for that level of confusion.John PeacockPete Campbell wrote: > > Thanks John. I didn't know about the field-length limits (not mentioned at > all in the SETHEADER section of the docs). Even so, its not clear that the > ACCOUNTNUM field is limited. > > Your solution about using a HEADERxx field instead of the ACCOUNTNUM field > works but its not clear why. ACCOUNTNUM does not appear to be limited in > length. If I set the ACCOUNTNUM header to a simple alphanumeric string (say > 7000600050004000300020001000 - 28 chars) it works fine. > > The problem appears to be related to the URL codes in the string assigned to > ACCOUNTNUM. For some reason, ACCOUNTNUM has a limited size if the string is > URLed. If I use a string of > [url]*&#@$(*@#)$*&#@$(*#$(*&#$(*#&$(*#&$)(*[/url], the decrypted UNURLed > ACCOUNTNUM value returned is *&#@$(*@#)$*&#@$%, much shorter than the > original string. If I use a HEADERxx field, this does not occur. > > FYI, I've tested this on WC 3.?? and 4.0b1. > > Pete > > ----- Original Message ----- > From: John Peacock > To: WebCatalog Talk > Sent: Monday, August 14, 2000 10:15 AM > Subject: Re: Encrypt & SetHeader Length Problem > > > Note that the header fields are all fixed length, and not your fields to > > play with casually. See the docs for the Puchase command, which lists > > most of the field lengths (AccountNum is not one of them, but 14 would > > cover all credit card lengths). > > > > If you want to store something longer, use one of Header1-Header40, and > > you won't have the length problem. > > > > HTH > > > > John Peacock > > > > Pete Campbell wrote: > > > > > > I'm trying to encrypt a number and put it into the cart ACCOUNTNUM > header > > > field. The problem is that only 14 digits of the original number/string > are > > > available after the DECRYPT. The ACCOUNTNUM field is not limited in > length > > > because I can set it to a string of any length. The problem seems to > occur > > > only when I use URLed ENCRYPT data. From the code & output below, it > looks > > > like the SETHEADER context is not storing all of the URL/ENCRYPT data. > > > > > > I use the [URL] context twice to convert the encrypted data to a > hex-only > > > value (presumably safer for headers & DB data). I also use the [URL] > context > > > inside the SETHEADER context because it seems to automatically unURL > data. > > > This way I (hopefully) ensure that the data stored in the header field > is > > > double-URLed. > > > > > > Thanks in advance for any help / suggestions / workarounds. > > > > > > Pete > > > > > > The test code and output is below: > > > > > > [!]************ WebCat code: ************ [/!] > > > [!]This code has a 12-digit input string and works properly.[/!] > > > > > > [text]encryptednum=[url][encrypt > > > seed=TestTest]300020001000[/encrypt][/url][/text] > > > Setting encrypted accountnum to [encryptednum]
> > > The decrypted value is [unurl][decrypt > > > seed=TestTest][encryptednum][/decrypt][/unurl]...
> > > [setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader] > > > Encrypted accountnum header is [accountnum]
> > > Decrypted accountnum header is [decrypt > > > seed=TestTest][unurl][accountnum][/unurl][/decrypt]

> > > > > > ************ Output: ************ > > > > > > Setting encrypted accountnum to 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8F > > > The decrypted value is 300020001000... > > > Encrypted accountnum header is 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8F > > > Decrypted accountnum header is 300020001000 > > > > > > [!]************ WebCat code: ************ [/!] > > > [!]This code has a 16-digit input string and does not work properly.[/!] > > > > > > [text]encryptednum=[url][encrypt > > > seed=TestTest]4000300020001000[/encrypt][/url][/text] > > > Setting encrypted accountnum to [encryptednum]
> > > The decrypted value is [unurl][decrypt > > > seed=TestTest][encryptednum][/decrypt][/unurl]...
> > > [setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader] > > > Encrypted accountnum header is [accountnum]
> > > Decrypted accountnum header is [decrypt > > > seed=TestTest][unurl][accountnum][/unurl][/decrypt]

> > > > > > ************ Output: ************ > > > > > > Setting encrypted accountnum to > > > %11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F%DEA%A6 > > > The decrypted value is 4000300020001000... > > > Encrypted accountnum header is > > > %11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F > > > Decrypted accountnum header is 40003000200010 > > > > > > The decrypted header above is missing the last 2 digits. > > > > > > ------------------------------------------------------------- > > > This message is sent to you because you are subscribed to > > > the mailing list . > > > To unsubscribe, E-mail to: > > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Encrypt Method SHA256 (christophe.billiottet@webdna.us 2018)
  2. Re: [WebDNA] Encrypt Method SHA256 (WebDNA Solutions 2018)
  3. [WebDNA] Encrypt Method SHA256 ("McMahon, Dustin" 2018)
  4. Re: [WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (Terry Wilson 2015)
  5. Re: [WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (Donovan Brooke 2015)
  6. [WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (Rich Kwas 2015)
  7. [WebDNA] Encrypt / Decrypt weirdness..... plus some date weirdness (Rich Kwas 2015)
  8. Re: [WebDNA] encrypt files/directories (Donovan Brooke 2011)
  9. Re: [WebDNA] encrypt files/directories (Govinda 2011)
  10. Re: [WebDNA] encrypt files/directories (christophe.billiottet@webdna.us 2011)
  11. Re: [WebDNA] encrypt files/directories (christophe.billiottet@webdna.us 2011)
  12. Re: [WebDNA] encrypt files/directories (Govinda 2011)
  13. Re: [WebDNA] encrypt files/directories (Grant Hulbert 2011)
  14. Re: [WebDNA] encrypt files/directories (Govinda 2011)
  15. Re: [WebDNA] encrypt files/directories ("Brian B. Burton" 2011)
  16. Re: [WebDNA] encrypt files/directories (Steve Raslevich -Northern Sound 2011)
  17. Re: [WebDNA] encrypt files/directories (Govinda 2011)
  18. Re: [WebDNA] encrypt files/directories (Steve Raslevich -Northern Sound 2011)
  19. Re: [WebDNA] encrypt files/directories (Govinda 2011)
  20. [WebDNA] encrypt files/directories (Steve Raslevich -Northern Sound 2011)
  21. Re: [WebDNA] orderfile - encrypt test request (Donovan Brooke 2011)
  22. [WebDNA] orderfile - encrypt test request (Donovan Brooke 2011)
  23. Re: Encrypt File ( Jim Ziegler 2006)
  24. Encrypt File ( Dave Daniels 2006)
  25. Re: Oh yes, it's Encrypt and Decrypt again ( Gary Krockover 2005)
  26. Re: Oh yes, it's Encrypt and Decrypt again ( Brian Fries 2005)
  27. Oh yes, it's Encrypt and Decrypt again ( Gary Krockover 2005)
  28. Re: encrypt but with normal characters for result? ( John Peacock 2005)
  29. Re: encrypt but with normal characters for result? ( Gary Krockover 2005)
  30. Re: encrypt but with normal characters for result? ( eLists 2005)
  31. Re: encrypt but with normal characters for result? ( "WebDna @ Inkblot Media" 2005)
  32. Re: encrypt but with normal characters for result? ( Gary Krockover 2005)
  33. Re: encrypt but with normal characters for result? ( eLists 2005)
  34. Re: encrypt but with normal characters for result? ( "WebDna @ Inkblot Media" 2005)
  35. Re: encrypt but with normal characters for result? ( "Dale's Lists" 2005)
  36. Re: encrypt but with normal characters for result? ( Gary Krockover 2005)
  37. encrypt but with normal characters for result? ( "Dale's Lists" 2005)
  38. Re: Unencrypt Password ( Kenneth Grome 2004)
  39. Unencrypt Password ( Clint Davis 2004)
  40. Re: encrypt method=APOP broken or just not enough docs? - was:MD5 encryption (Brian Fries 2003)
  41. Re: encrypt method=APOP broken or just not enough docs? - was:MD5 encryption (Dale LaFountain 2003)
  42. Re: encrypt method=APOP broken or just not enough docs? - wasMD5 encryption (Scott Anderson 2003)
  43. encrypt method=APOP broken or just not enough docs? - was MD5encryption (Dale LaFountain 2003)
  44. Re: Encrypt a page/template (Gary Krockover 2002)
  45. Re: Encrypt a page/template (Brian Fries 2002)
  46. Encrypt a page/template (Lester Emo 2002)
  47. Re: encrypt algorythm (John Peacock 2002)
  48. encrypt algorythm (Gyuri 2002)
  49. Re: Encrypt Decrypt URL UnURL Weirdness (Stuart Tremain 2001)
  50. Re: Encrypt Decrypt URL UnURL Weirdness (Glenn Busbin 2001)
  51. Re: Encrypt Decrypt URL UnURL Weirdness (Stuart Tremain 2001)
  52. Re: Encrypt Decrypt URL UnURL Weirdness (Glenn Busbin 2001)
  53. Re: Encrypt Decrypt URL UnURL Weirdness (Brian Fries 2001)
  54. Re: Encrypt Decrypt URL UnURL Weirdness (Glenn Busbin 2001)
  55. Re: Encrypt Decrypt URL UnURL Weirdness (Brian Fries 2001)
  56. Re: Encrypt Decrypt URL UnURL Weirdness (Glenn Busbin 2001)
  57. Re: Encrypt Decrypt URL UnURL Weirdness (Brian Fries 2001)
  58. Encrypt Decrypt URL UnURL Weirdness (Glenn Busbin 2001)
  59. Re: encrypt and decrypt (John Peacock 2001)
  60. encrypt and decrypt (Glenn Busbin 2001)
  61. Re: Encrypt & SetHeader Length Problem (Pete Campbell 2000)
  62. Re: Encrypt & SetHeader Length Problem (Pete Campbell 2000)
  63. Re: Encrypt & SetHeader Length Problem (Kenneth Grome 2000)
  64. Encrypt & SetHeader Length Problem (Pete Campbell 2000)
  65. Re: Encrypt & SetHeader Length Problem (John Peacock 2000)
  66. Re: Encrypt & SetHeader Length Problem (John Peacock 2000)
  67. Re: What is the default seed for the encrypt context? (John Butler 2000)
  68. Re: What is the default seed for the encrypt context? (John Peacock 2000)
  69. Re: What is the default seed for the encrypt context? (Bob Minor 2000)
  70. What is the default seed for the encrypt context? (Nicolas Verhaeghe 2000)
  71. Re: Encrypt question. (MARC MALACARME 2000)
  72. Re: Encrypt question. (Kenneth Grome 2000)
  73. Re: Encrypt question. (Marc 2000)
  74. Re: Encrypt question. (John Butler 2000)
  75. Re: Encrypt question. (John Butler 2000)
  76. Re: Encrypt question. (MARC MALACARME 2000)
  77. Re: Encrypt question. (James Howarth 2000)
  78. Re: Encrypt question. (Kenneth Grome 2000)
  79. Re: Encrypt question. (MARC MALACARME 2000)
  80. Re: Encrypt question. (Kenneth Grome 2000)
  81. Re: Encrypt question. (MARC MALACARME 2000)
  82. Re: Encrypt question. (Kenneth Grome 2000)
  83. Encrypt question. (MARC MALACARME 2000)
  84. about to encrypt a template (Joseph D'Andrea 2000)
  85. Re: Encrypt Problems (Joseph D'Andrea 2000)
  86. Encrypt Problems (Brian Boegershausen 2000)
  87. Re: [ENCRYPT seed=xxxxx] length (John Peacock 2000)
  88. Re: [ENCRYPT seed=xxxxx] length (Kenneth Grome 2000)
  89. [ENCRYPT seed=xxxxx] length (Derek C. 2000)
  90. Re: WebCat Mac OS X and Encrypt Help Need (dale@gmr.dresdner.net 2000)
  91. WebCat Mac OS X and Encrypt Help Need (Palle Bo Nielsen 2000)
  92. Re: Encrypt broken on Mac 3.05b13?? (Grant Hulbert 2000)
  93. Re: Encrypt broken on Mac 3.05b13?? (Marty Schmid 2000)
  94. Re: Encrypt broken on Mac 3.05b13?? (Grant Hulbert 2000)
  95. Encrypt broken on Mac 3.05b13?? (Marty Schmid 2000)
  96. Re: Encrypt broken on Mac 3.05b13?? (Kenneth Grome 2000)
  97. Re: Encrypt broken on Mac 3.05b13?? (webcatalog@smithmicro.com 2000)
  98. Encrypt broken on Mac 3.05b13?? (Marty Schmid 2000)
  99. failure to encrypt (or maybe decrypt) (ken@chargemaster.com 1999)
  100. faulure to encrypt (or maybe decrypt) (Kenneth Grome 1999)
  101. Re: WebCat Contest Now: Encrypt and Sell (The Mooseman 1998)
  102. Re: Template Encrypt Speed (PCS Technical Support 1998)
  103. Re: Template Encrypt Speed (Paul Willis 1998)
  104. Re: Template Encrypt Speed (John Hill 1998)
  105. Template Encrypt Speed (Bob Minor 1998)
  106. Re: Encrypt and Commit Me (PCS Technical Support 1998)
  107. Encrypt and Commit Me (The Mooseman 1998)
  108. Re: Encrypt Users.db problem (PCS Technical Support 1998)
  109. Re: Encrypt Users.db problem (Kenneth Grome 1998)
  110. Encrypt Users.db problem (Wayne Morishige 1998)
  111. how to use encrypt and searching (Olin 1998)
  112. Re: Users.db [encrypt seed=????] (Grant Hulbert 1998)
  113. Re: Users.db [encrypt seed=????] (Bob Minor 1998)
  114. Users.db [encrypt seed=????] (Marty Schmid 1998)
SMSI will have to explain why the ACCOUNTNUM field takes more bare text than it does url'd encrypted text. This does, however, raise the question: Why are you encrypting in the first place?Since the cart file is located on the server and never sent to the browser (unless you specify that field for display), and you can add anything to the cart header in such a way that it never appears in the HTML source, I see no reason to use encrypt at all. I know some people have used doubly-url'd and encrypted text for storage in cookies, but here there does not seem to be any need for that level of confusion.John PeacockPete Campbell wrote: > > Thanks John. I didn't know about the field-length limits (not mentioned at > all in the SETHEADER section of the docs). Even so, its not clear that the > ACCOUNTNUM field is limited. > > Your solution about using a HEADERxx field instead of the ACCOUNTNUM field > works but its not clear why. ACCOUNTNUM does not appear to be limited in > length. If I set the ACCOUNTNUM header to a simple alphanumeric string (say > 7000600050004000300020001000 - 28 chars) it works fine. > > The problem appears to be related to the URL codes in the string assigned to > ACCOUNTNUM. For some reason, ACCOUNTNUM has a limited size if the string is > URLed. If I use a string of > [url]*&#@$(*@#)$*&#@$(*#$(*&#$(*#&$(*#&$)(*[/url], the decrypted UNURLed > ACCOUNTNUM value returned is *&#@$(*@#)$*&#@$%, much shorter than the > original string. If I use a HEADERxx field, this does not occur. > > FYI, I've tested this on WC 3.?? and 4.0b1. > > Pete > > ----- Original Message ----- > From: John Peacock > To: WebCatalog Talk > Sent: Monday, August 14, 2000 10:15 AM > Subject: Re: Encrypt & SetHeader Length Problem > > > Note that the header fields are all fixed length, and not your fields to > > play with casually. See the docs for the Puchase command, which lists > > most of the field lengths (AccountNum is not one of them, but 14 would > > cover all credit card lengths). > > > > If you want to store something longer, use one of Header1-Header40, and > > you won't have the length problem. > > > > HTH > > > > John Peacock > > > > Pete Campbell wrote: > > > > > > I'm trying to encrypt a number and put it into the cart ACCOUNTNUM > header > > > field. The problem is that only 14 digits of the original number/string > are > > > available after the DECRYPT. The ACCOUNTNUM field is not limited in > length > > > because I can set it to a string of any length. The problem seems to > occur > > > only when I use URLed ENCRYPT data. From the code & output below, it > looks > > > like the SETHEADER context is not storing all of the URL/ENCRYPT data. > > > > > > I use the [url] context twice to convert the encrypted data to a > hex-only > > > value (presumably safer for headers & DB data). I also use the [url] > context > > > inside the SETHEADER context because it seems to automatically unURL > data. > > > This way I (hopefully) ensure that the data stored in the header field > is > > > double-URLed. > > > > > > Thanks in advance for any help / suggestions / workarounds. > > > > > > Pete > > > > > > The test code and output is below: > > > > > > [!]************ WebCat code: ************ [/!] > > > [!]This code has a 12-digit input string and works properly.[/!] > > > > > > [text]encryptednum=[url][encrypt > > > seed=TestTest]300020001000[/encrypt][/url][/text] > > > Setting encrypted accountnum to [encryptednum]
> > > The decrypted value is [unurl][decrypt > > > seed=TestTest][encryptednum][/decrypt][/unurl]...
> > > [setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader] > > > Encrypted accountnum header is [accountnum]
> > > Decrypted accountnum header is [decrypt > > > seed=TestTest][unurl][accountnum][/unurl][/decrypt]

> > > > > > ************ Output: ************ > > > > > > Setting encrypted accountnum to 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8F > > > The decrypted value is 300020001000... > > > Encrypted accountnum header is 8%1E%B8D%88Rq%8F%F7%12%C6n%08q%AF%8F > > > Decrypted accountnum header is 300020001000 > > > > > > [!]************ WebCat code: ************ [/!] > > > [!]This code has a 16-digit input string and does not work properly.[/!] > > > > > > [text]encryptednum=[url][encrypt > > > seed=TestTest]4000300020001000[/encrypt][/url][/text] > > > Setting encrypted accountnum to [encryptednum]
> > > The decrypted value is [unurl][decrypt > > > seed=TestTest][encryptednum][/decrypt][/unurl]...
> > > [setheader cart=[cart]]accountnum=[url][encryptednum][/url][/setheader] > > > Encrypted accountnum header is [accountnum]
> > > Decrypted accountnum header is [decrypt > > > seed=TestTest][unurl][accountnum][/unurl][/decrypt]

> > > > > > ************ Output: ************ > > > > > > Setting encrypted accountnum to > > > %11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F%DEA%A6 > > > The decrypted value is 4000300020001000... > > > Encrypted accountnum header is > > > %11%D7%C0%84_%F3%03wrG%DF%8En%EFy%5D%AF%85h%28%7F > > > Decrypted accountnum header is 40003000200010 > > > > > > The decrypted header above is missing the last 2 digits. > > > > > > ------------------------------------------------------------- > > > This message is sent to you because you are subscribed to > > > the mailing list . > > > To unsubscribe, E-mail to: > > > To switch to the DIGEST mode, E-mail to > > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > > This message is sent to you because you are subscribed to > > the mailing list . > > To unsubscribe, E-mail to: > > To switch to the DIGEST mode, E-mail to > > > Web Archive of this list is at: http://search.smithmicro.com/ > > > > ------------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to > Web Archive of this list is at: http://search.smithmicro.com/------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Upgrade to 4.0 (2001) WebCat2: Formulas.db question (1997) shipcost (1997) WebDNA and Virtual Servers (2003) 4.5 Upgrade (2003) Commas in search (1998) Searching multiple fields (1997) Strange error (2000) Need help with emailer- 2 issues (1997) WCS Newbie question (1997) [WebDNA] Best of breed eCommerce and CMS/Sitebuilder templates (2010) Searching Multiple DBs (1997) Botched cart numbers in webmerchant 2.1x email with webcat 3 (1998) Sort Order on a page search (1997) WCS Newbie question (1997) oops private message leaked into talk list (1997) [WebDNA] [replace] bug in v7.0? (2010) Some Questions (1997) Summ=T Problem (1997) Download URL & access on the fly ? (1997)