• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

修訂6e7ce26cea0e8d5bdbbebc3752bf9f0551948187 (tree)
時間2010-03-18 23:09:04
作者h677 <h677>
Commiterh677

Log Message

生キー指定で、16桁未満とSaltが16進数以外で???にするように修正

Change Summary

差異

--- a/Trip.pas
+++ b/Trip.pas
@@ -424,12 +424,12 @@ procedure get_pw_salt(
424424 const pw : PChar;
425425 var convpw : String;
426426 const salt : PChar
427-);
427+) ;
428428 var
429429 i : integer;
430430 begin
431431 // ^([0-9A-Fa-f]{16})([./0-9A-Za-z]{0,2})$
432- if (Length(pw) >= 17) or (Length(pw) <= 19) then begin
432+ if (Length(pw) >= 17) and (Length(pw) <= 19) then begin
433433 // ƒL[•”•ª
434434 for i := 0 to 7 do begin
435435 if (Pos(pw[2*i + 0 + 1], '0123456789abcdefABCDEF') > 0) and
@@ -501,6 +501,9 @@ begin
501501 if (pw[ 0 ] = '#') and (Length(pw) >= 20) then begin
502502 // «—ˆ‚ÌŠg’£—p
503503 Result := '???';
504+ end else if Length(convpw) = 0 then begin
505+ // ¶ƒL[•ûŽ®ƒGƒ‰[
506+ Result := '???';
504507 end else if Length(convpw) = 8 then begin
505508 Result := Copy( crypt_r( PChar(convpw), salt, s ), 4, 100 );
506509 end else begin