82. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/18/2017 11:37:29 AM Eastern Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

82.1 Files compared

# Location File Last Modified
1 OSCIF_CPRS v32 Phase 2 Build 2OR3.0405_August_2017.zip\OR_30_405V36_SRC.zip\XE8\Broker\Source VCEdit.pas Wed Oct 11 20:08:07 2017 UTC
2 OSCIF_CPRS v32 Phase 2 Build 2OR3.0405_August_2017.zip\OR_30_405V36_SRC.zip\XE8\Broker\Source VCEdit.pas Tue Oct 17 19:58:08 2017 UTC

82.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 668
Changed 1 2
Inserted 0 0
Removed 0 0

82.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

82.4 Active regular expressions

No regular expressions were active.

82.5 Comparison detail

  1   { ******** ********** ********** ********** ********** ********** ****
  2           Pa ckage: XWB  - Kernel  RPCBroker
  3           Da te Created : Sept 18,  1997 (Ver sion 1.1)
  4           Si te Name: O akland, OI  Field Off ice, Dept  of Veteran  Affairs
  5           De velopers:  PII, PII,  PII, PII
  6           De scription:  Contains  TRPCBroker  and relat ed compone nts.
  7     Unit: VC Edit Verif y Code edi t dialog.
  8           Cu rrent Rele ase: Versi on 1.1 Pat ch 65
  9   ********** ********** ********** ********** ********** ********** *** }
  10  
  11   { ******** ********** ********** ********** ********** **
  12     Changes  in v1.1.65  (HGW 08/0 5/2015) XW B*1.1*65
  13     1. Chang ed TVCEdit .ChangeVCK nowOldVC s o that if  old verify  code was  less
  14        than  eight digi ts, box wo uld not be  greyed ou t (manuall y enter ol d VC).
  15        This  is because  using SSO , old VC i s not ente red in log in form.
  16     2. Added  procedure  btnCancel Click to c ontinue wi th login i f user cho oses
  17        to ca ncel chang ing verify  code.
  18  
  19     Changes  in v1.1.60  (HGW 11/2 0/2013) XW B*1.1*60
  20     1. Fixed  process t o change V C. VC chan ge did not  work if l owercase c hars
  21        were  used in th e new veri fy code. G UI was cas e-sensitiv e, but Vis tA is not.
  22  
  23     Changes  in v1.1.50  (JLI 09/0 1/2011) XW B*1.1*50
  24     1. None.
  25   ********** ********** ********** ********** **********  }
  26   unit VCEdi t;
  27  
  28   interface
  29  
  30   uses
  31     {System}
  32     SysUtils , Classes,
  33     {WinApi}
  34     Windows,  Messages,
  35     {VA}
  36     Trpcb, X WBHash,
  37     {Vcl}
  38     Graphics , Controls , Forms, D ialogs, St dCtrls, Bu ttons;
  39  
  40   type
  41     TVCEdit  = class(TC omponent)
  42       privat e
  43         FRPC Broker : T RPCBroker;
  44         FOld VC     : s tring;
  45         FCon firmFailCn t : intege r;  //coun ts failed  confirms.
  46         FHel p      : s tring;
  47         FOld VCSet: Boo lean;  //  Shows whet her old co de was pas sed in, ev en if NULL
  48         proc edure NoCh ange(reaso n : string );
  49       protec ted
  50       public
  51         cons tructor Cr eate(AOwne r: TCompon ent); over ride;
  52         dest ructor Des troy; over ride;
  53         func tion Chang eVCKnowOld VC(strOldV C : string ) : Boolea n;
  54         func tion Chang eVC : Bool ean;
  55       publis hed
  56         prop erty RPCBr oker : TRP CBroker re ad FRPCBro ker write  FRPCBroker ;
  57     end;
  58  
  59     TfrmVCEd it = class (TForm)
  60       lblOld VC: TLabel ;
  61       lblNew VC: TLabel ;
  62       lblCon firmVC: TL abel;
  63       edtOld VC: TEdit;
  64       edtNew VC: TEdit;
  65       edtCon firmVC: TE dit;
  66       btnOK:  TBitBtn;
  67       btnCan cel: TBitB tn;
  68       btnHel p: TBitBtn ;
  69       proced ure btnOKC lick(Sende r: TObject );
  70       proced ure btnHel pClick(Sen der: TObje ct);
  71       proced ure edtNew VCExit(Sen der: TObje ct);
  72       proced ure edtOld VCChange(S ender: TOb ject);
  73       proced ure btnCan celClick(S ender: TOb ject);
  74     protecte d
  75       { Priv ate declar ations }
  76       FVCEdi t : TVCEdi t;   //Lin ks form to  instance  of VCEdit.
  77     public
  78       { Publ ic declara tions }
  79     end;
  80  
  81   function C hangeVerif y(RPCBroke r: TRPCBro ker): Bool ean;
  82   function S ilentChang eVerify(RP CBroker: T RPCBroker;  OldVerify , NewVerif y1, NewVer ify2: Stri ng; var Re ason: Stri ng): Boole an;
  83  
  84   var
  85     frmVCEdi t: TfrmVCE dit;
  86  
  87   const
  88     MAX_CONF IRM_FAIL :  integer =  3;
  89     U = '^';
  90  
  91   {procedure  Register; }
  92  
  93   implementa tion
  94  
  95   {$R *.DFM}
  96  
  97   function C hangeVerif y(RPCBroke r: TRPCBro ker): Bool ean;
  98   var
  99     VCEdit1:  TVCEdit;
  100   begin
  101   //  Str :=  '';
  102     VCEdit1  := TVCEdit .Create(Ap plication) ;
  103     try
  104       VCEdit 1.RPCBroke r := RPCBr oker;
  105       if VCE dit1.Chang eVC then   //invoke V CEdit form .                                                  //V C changed.
  106         Resu lt := True
  107       else
  108         Resu lt := Fals e;
  109     finally
  110       VCEdit 1.Free;
  111     end;
  112   end;
  113  
  114   function S ilentChang eVerify(RP CBroker: T RPCBroker;  OldVerify , NewVerif y1, NewVer ify2: Stri ng; var Re ason: Stri ng): Boole an;
  115   var
  116     OrigCont ext: Strin g;
  117   begin
  118     Result : = False;
  119     Reason : = '';
  120     if OldVe rify = New Verify1 th en
  121       Reason  := 'The n ew code is  the same  as the cur rent one.'
  122     else
  123     if NewVe rify1 <> N ewVerify2  then
  124       Reason  := 'The c onfirmatio n code doe s not matc h.';
  125     if Reaso n = '' the n
  126     try
  127       with R PCBroker d o
  128       begin
  129         Orig Context :=  CurrentCo ntext;
  130         Crea teContext( 'XUS SIGNO N');
  131         Remo teProcedur e := 'XUS  CVC';
  132         Para m[0].PType  := litera l;
  133         Para m[0].Value  := Encryp t(OldVerif y)
  134                             + U +  Encrypt(Ne wVerify1)
  135                             + U +  Encrypt(Ne wVerify2)  ;
  136         Call ;
  137         Reas on := '';
  138         if R esults[0]  = '0' then
  139           Re sult := Tr ue
  140         else  if Result s.Count >  1 then
  141           Re ason := Re sults[1];
  142         Crea teContext( OrigContex t);
  143       end;
  144     except
  145       on E:  Exception  do
  146       begin
  147         RPCB roker.RPCB Error := E .Message;
  148         if A ssigned(RP CBroker.On RPCBFailur e) then
  149           RP CBroker.On RPCBFailur e(RPCBroke r)
  150         else  if RPCBro ker.ShowEr rorMsgs =  semRaise t hen
  151           Ra ise;
  152       end;
  153     end;
  154   end;
  155  
  156   {--------- ---------T VCEdit com ponent---- ---------- ---------- ---------- --}
  157  
  158   constructo r TVCEDit. Create(AOw ner: TComp onent);
  159   begin
  160     inherite d Create(A Owner);
  161     FOldVCSe t := False ;
  162   end;
  163  
  164   destructor  TVCEDit.D estroy;
  165   begin
  166     inherite d Destroy;
  167   end;
  168  
  169  
  170   function T VCEdit.Cha ngeVCKnowO ldVC(strOl dVC : stri ng) : Bool ean;
  171   begin
  172     FOldVC : = strOldVC ;
  173     FOldVCSe t := True;
  174     if Lengt h(FOldVC)  < 8 then
  175       FOldVC Set := Fal se;
  176     Result : = ChangeVC ;
  177     FOldVCSe t := False ;  // set  it back to  false in  case we co me in agai n
  178   end;
  179  
  180   {--------- ---------- -------Cha ngeVC func tion------ ---------- ---------- -}
  181   function T VCEdit.Cha ngeVC : Bo olean;
  182   var
  183     OldHandl e: THandle ;
  184   begin
  185     Result : = False;
  186     try
  187       frmVCE Dit := Tfr mVCEDit.Cr eate(appli cation);
  188       with f rmVCEDit d o
  189       begin
  190         FVCE dit := Sel f;      // To link fo rm to VCEd it instanc e.
  191         if F OldVCSet t hen      / /If old VC  known, st uff it & d isable edi ting.
  192         begi n
  193           ed tOldVC.Col or := clBt nFace;
  194           ed tOldVC.Ena bled := Fa lse;
  195           ed tOldVC.Tex t := FOldV C;
  196         end{ if};
  197   //           ShowAppl icationAnd FocusOK(Ap plication) ;
  198         OldH andle := G etForegrou ndWindow;
  199         SetF oregroundW indow(frmV CEdit.Hand le);
  200         if S howModal =  mrOK then     //outc ome of for m.
  201           Re sult := Tr ue;
  202         SetF oregroundW indow(OldH andle);
  203       end{wi th};
  204     frmVCEDi t.Free;
  205     except
  206       on E:  Exception  do
  207       begin
  208         FRPC Broker.RPC BError :=  E.Message;
  209         if A ssigned(FR PCBroker.O nRPCBFailu re) then
  210           FR PCBroker.O nRPCBFailu re(FRPCBro ker)
  211         else  if FRPCBr oker.ShowE rrorMsgs =  semRaise  then
  212           Ra ise;
  213       end;
  214     end{exce pt};
  215   end;
  216  
  217   {--------- ---------T VCEdit.NoC hange----- ---------- ---------- ---------- --
  218   ---------- -Displays  error mess ages when  change fai ls.------- ---------- --}
  219   procedure  TVCEdit.No Change(rea son : stri ng);
  220   begin
  221     ShowMess age('Your  VERIFY cod e was not  changed.'  + #13 +
  222                  reason  + #13 );
  223   end;
  224  
  225  
  226   {--------- ---------- ------Tfrm VCEdit met hods------ ---------- ---------- -----}
  227   procedure  TfrmVCEdit .btnOKClic k(Sender:  TObject);
  228   begin
  229     with FVC Edit do
  230     begin
  231       edtOld VC.Text :=  AnsiUpper Case(edtOl dVC.Text);      //p60
  232       edtNew VC.Text :=  AnsiUpper Case(edtNe wVC.Text);      //p60
  233       edtCon firmVC.Tex t := AnsiU pperCase(e dtConfirmV C.Text);      //p60
  234       if edt OldVC.Text  = edtNewV C.Text the n
  235       begin
  236         NoCh ange('The  new code i s the same  as the cu rrent one. ');
  237         edtN ewVC.Text  := '';
  238         edtC onfirmVC.T ext := '';
  239         edtN ewVC.SetFo cus;
  240       end
  241       else
  242       if edt NewVC.Text  <> edtCon firmVC.Tex t then
  243       begin
  244         inc( FConfirmFa ilCnt);
  245         if F ConfirmFai lCnt > MAX _CONFIRM_F AIL then
  246         begi n
  247           ed tNewVC.Tex t := '';
  248           ed tConfirmVC .Text := ' ';
  249           No Change('Th e confirma tion code  does not m atch.');
  250           ed tNewVC.Set Focus;
  251         end
  252         else
  253         begi n
  254           ed tConfirmVC .text := ' ';
  255           No Change('Th e confirma tion code  does not m atch.  Try  again.');
  256           ed tConfirmVC .SetFocus;
  257         end;
  258       end
  259       else
  260       with F RPCBroker  do
  261       begin
  262         Remo teProcedur e := 'XUS  CVC';
  263         Para m[0].PType  := litera l;
  264         Para m[0].Value  := Encryp t(edtOldVC .Text)
  265                             + U +  Encrypt(ed tNewVC.Tex t)
  266                             + U +  Encrypt(ed tConfirmVC .Text) ;
  267         Call ;
  268         if R esults[0]  = '0' then
  269         begi n
  270           Sh owMessage( 'Your VERI FY CODE ha s been cha nged');
  271           Mo dalResult  := mrOK;   //Close fo rm.
  272         end
  273         else
  274         begi n
  275           if  Results.C ount > 1 t hen
  276              NoChange(R esults[1])
  277           el se
  278              NoChange(' ');
  279           ed tNewVC.Tex t := '';
  280           ed tConfirmVC .Text := ' ';
  281           ed tNewVC.Set Focus;
  282         end;
  283       end;
  284     end{with };
  285   end;
  286  
  287   procedure  TfrmVCEdit .btnCancel Click(Send er: TObjec t);
  288   begin
  289     with FVC Edit do
  290     begin
  291       edtOld VC.Text :=  AnsiUpper Case(edtOl dVC.Text);      //p65
  292       NoChan ge('You ch ose to can cel the ch ange.');
  293       ModalR esult := m rOK;  //re sult
  294     end{with };
  295   end;
  296  
  297   procedure  TfrmVCEdit .btnHelpCl ick(Sender : TObject) ;
  298   begin
  299     with FVC Edit do
  300     begin
  301       if FHe lp = '' th en
  302       begin
  303         with  FRPCBroke r do
  304         begi n
  305           Re moteProced ure := 'XU S AV HELP' ;
  306           Ca ll;
  307           if  Results.C ount > 0 t hen
  308              FHelp := R esults[0];
  309           FH elp := 'En ter a new  verify cod e and then  confirm i t.'
  310                     + # 13#13 + FH elp;
  311           if  FOldVC =  '' then
  312              FHelp := ' Enter your  current v erify code  first.' +  #13#10 +  FHelp;
  313         end{ with};
  314       end{if };
  315       ShowMe ssage(FHel p);
  316     end{with };
  317   end;
  318  
  319   procedure  TfrmVCEdit .edtNewVCE xit(Sender : TObject) ;
  320   begin
  321     if edtNe wVC.Modifi ed then
  322     begin
  323       FVCEdi t.FConfirm FailCnt :=  0;                 / /Reset cou nter.
  324       edtNew VC.Modifie d := False ;
  325     end;
  326   end;
  327  
  328   procedure  TfrmVCEdit .edtOldVCC hange(Send er: TObjec t); //Also  NewVC and  ConfirmVC
  329   begin
  330     btnOk.De fault := ( (edtNewVC. Text <> '' ) and         //Updat e status o f OK btn.
  331                         (edtOldVC. Text <> '' ) and
  332                         (edtConfir mVC.Text < > '') );
  333   end;
  334  
  335   end.