Changeset 3444 for branches/2.2/security


Ignore:
Timestamp:
10/29/10 17:08:55 (14 years ago)
Author:
amuller
Message:

Ticket #990 - Correção na geração da imagem do Captcha

Location:
branches/2.2/security
Files:
5 added
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2/security/captcha.php

    r3437 r3444  
    8383      $image       = imagecreate($imagelength, $imageheight); 
    8484      $bgcolor     = imagecolorallocate($image, 146, 176, 212); 
    85       $stringcolor = imagecolorallocate($image, 0, 0, 155); 
     85      $stringcolor = imagecolorallocate($image, 0, rand(0,100), rand(0,155)); 
    8686      $linecolor   = imagecolorallocate($image, 0, 0, 0); 
    87       imagettftext($image, 25, -4, 8, 25, 
     87      imagettftext($image, 20, rand(-4,4),8,30, 
    8888                   $stringcolor, 
    8989                   $this->Font, 
    9090                   $this->CaptchaString); 
    9191      imagecolortransparent($image,$bgcolor); 
     92 
     93 
     94      $src = imagecreatefrompng('captcha_images/img00'.rand(1,4).'.png'); 
     95      imagecopymerge($image, $src, 0, 0, 0, 0, 151, 37, 25); 
     96 
    9297      switch ($this->ImageType) 
    9398      { 
Note: See TracChangeset for help on using the changeset viewer.