Encode Function With A Get-value Field

maretix

Member
Hi to all.
I wrote a simple URL WebSpeed that has 2 arguments.

1st argument is a string that contains an ERP USER
2st argument is a string that contains ERP'S USER Password. (This string is free NOT ENCODED)

The goal of this URL Webspeed is to read an ERP Table that contains ERP's user data (user code and password).
The field that contains password is encoded

I need to test <mytable>.password with GET-VALUE("Password)
I created a variable Gv = GET-VALUE("Password)

I did this :

if <mytable>.password <> ENCODE (gv)
My problem is that condition is Always TRUE.
Even if i wrote correct password in WEBSPEED argument , i cannot understand why.

Is there anything i have to do if i use GET-VALUE()

I put a message and value are different...

Any help ???
 

Stefan

Well-Known Member
The following, while not using passwords, returns exactly what is passed on the url with

http://<server>/cgiip.11.6.exe/WService=wsurl/url.p?one=first&two=second

Code:
{ src/web/method/wrap-cgi.i }

output-content-type( "text/html; charset=utf-8" ).

{&out} "<html>".
run showParam ( "one" ).
run showParam ( "two" ).
{&out} "</html>".

procedure showParam private:
   define input parameter i_cparam as char no-undo.

   {&out}
      substitute(
         "&1: '&2' length: &3",
         i_cparam,
         get-value( i_cparam ),
         length( get-value( i_cparam ) )
      ).
   {&out} "<br/>".

end procedure.
 

maretix

Member
Hi Stefan.
Thanks a lot for your sample code.
It was very useful for me , i found my 'bug'...i solved my issue.
Thanks a lot.
 
Top