Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Install script Windows installer summary dialog displays dba password


2 replies to this topic

Pooja Hegde

Pooja Hegde
  • Full Members
  • 7 posts

Posted 12 December 2014 - 10:47

 

 

 

 Problem :

 

Windows installer summary dialog displays dba password & dbpassword in clear text.

Either the password needs to be hidden or the encrypted value (from moca registry) needs to be displayed.

 

created a function  called "StrRepeat" that accepts a character and a number, and returns a string built by repeating that character number of times (in a for loop).

 

so if the input is strRepeat('*', 5) the return is *****   example password is test return should be ****

 

condition 

 if (szName % "PASSWORD" ) then  
                         szValue = StrRepeat ("*", StrLength(szValue)) ;
                                                    
                   endif;  
 
This is code written but 
 
function STRING StrRepeat (svChar, ncount)
 
NUMBER iCount ,nvresult, i ;
STRING szValue,strRepeat ,szString;
begin
 for  iCount = 0 to ncount  
    szValue = szValue + "*"; 
        return StrLength ();
  endfor;                                                               
end;
 
But result is just a "*"  i want output like example password is test return should be ****
 

 



Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 12 December 2014 - 17:55

The return staement should be outside the for loop (after endfor).

You can step through the code in the debugger to diagnose such problems.

 

For better security, often a fixed number of ***** is displayed, and not matching the number of characters in the password, as this might be a hint to guess the password.

 

Or simply don't add the password to the dialog.



Pooja Hegde

Pooja Hegde
  • Full Members
  • 7 posts

Posted 13 December 2014 - 09:16

Thanks Stefan,

 

I have added return statement outside the loop and its working fine now.