User Tools

Site Tools


en:dev:284:security

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:dev:284:security [24.03.2016 21:31] – [::getTokenLifeTime] translated mrbasemanen:dev:284:security [24.03.2016 21:39] – [Twig-Template] translated mrbaseman
Line 83: Line 83:
  
 ---- ----
-==== Anwendungsbeispiele ==== +==== Examples ==== 
-:!: **Achtung:** Requests müssen eindeutig seinDer 'action' Parameter eines **//form//** Tags darf keine zusätzlichen URL-Argumente ( //*.php?x=1//enthaltenEventuell notwendige Zusatzargumente müssen mit //<input type="hidden" …>// übergeben werden.+:!: **Warning** Requests must be uniqueThe 'action' parameter of a **//form//** tag must not contain any additional URL arguments ( //*.php?x=1// ). Any necessary additional arguments must be passed with //<input type="hidden" …>//.
  
-=== Formular ===+=== Form ===
 <PHP> <PHP>
 $sOutput = '<form method="post" action="index.php">' $sOutput = '<form method="post" action="index.php">'
Line 93: Line 93:
 echo $sOutput;     echo $sOutput;    
  
-// Auswertung+// Evaluation
  
-if ($oReg->App->checkFTAN('POST')) { /* alles OK */ }+if ($oReg->App->checkFTAN('POST')) { /* everythig OK */ }
  
 $iRecordId = $oReg->App->checkIDKEY('record_id', 0, 'POST'); $iRecordId = $oReg->App->checkIDKEY('record_id', 0, 'POST');
Line 105: Line 105:
 echo $sOutput;     echo $sOutput;    
  
-// Auswertung+// Evaluation
  
-if ($oReg->App->checkFTAN('GET')) { /* alles OK */ }+if ($oReg->App->checkFTAN('GET')) { /* everything OK */ }
  
 $iRecordId = $oReg->App->checkIDKEY('record_id', 0, 'GET'); $iRecordId = $oReg->App->checkIDKEY('record_id', 0, 'GET');
Line 122: Line 122:
 twig-template twig-template
  
-// Beispiel 1+// Example 1
  <form method="post" action="{{ TargetUrl }}">  <form method="post" action="{{ TargetUrl }}">
    <input type="hidden" name="{{ FTAN.name }}" value="{{ FTAN.value }}">    <input type="hidden" name="{{ FTAN.name }}" value="{{ FTAN.value }}">
Line 129: Line 129:
  </form>  </form>
  
-// Beispiel +// Example 
- <a href="{{ TargetUrl }}?{{ FTAN.name }}={{ FTAN.value }}&record_id={{ RecordId }}" title="xx">Tu was</a>+ <a href="{{ TargetUrl }}?{{ FTAN.name }}={{ FTAN.value }}&record_id={{ RecordId }}" title="xx">Do something</a>
 </PHP> </PHP>
 <PHP> <PHP>
 save-script save-script
  
-// Beispiel 1+// Example 1
 if ($oReg->App->checkFTAN()) { if ($oReg->App->checkFTAN()) {
     $record_id = $oReg->App->checkIDKEY('record_id');     $record_id = $oReg->App->checkIDKEY('record_id');
     [...]     [...]
 }    }   
-// Beispiel 2+// Example 2
 if ($oReg->App->checkFTAN('GET')) { if ($oReg->App->checkFTAN('GET')) {
     $record_id = $oReg->App->checkIDKEY('record_id', 0, 'GET');     $record_id = $oReg->App->checkIDKEY('record_id', 0, 'GET');
en/dev/284/security.txt · Last modified: 24.03.2016 21:41 by mrbaseman