From 654e3f7381054afe91d85299a731094a1985ac8e Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Mon, 11 Jun 2018 11:50:17 +0200 Subject: [PATCH] Use escape smarty modifier to enforce security --- public_html/templates/default/LSform.tpl | 32 +++++----- .../templates/default/LSformElement.tpl | 2 +- .../default/LSformElement_boolean_field.tpl | 4 +- .../default/LSformElement_date_field.tpl | 4 +- .../templates/default/LSformElement_field.tpl | 4 +- .../default/LSformElement_image_field.tpl | 2 +- .../LSformElement_jsonCompositeAttribute.tpl | 2 +- ...rmElement_jsonCompositeAttribute_field.tpl | 24 ++++---- .../default/LSformElement_labeledValue.tpl | 2 +- .../LSformElement_labeledValue_field.tpl | 14 ++--- .../default/LSformElement_mailQuota_field.tpl | 10 ++-- .../default/LSformElement_maildir_field.tpl | 4 +- .../default/LSformElement_password.tpl | 2 +- .../default/LSformElement_password_field.tpl | 6 +- .../default/LSformElement_quota_field.tpl | 12 ++-- .../default/LSformElement_select.tpl | 12 ++-- .../default/LSformElement_select_box.tpl | 12 ++-- .../default/LSformElement_select_object.tpl | 2 +- .../LSformElement_select_object_field.tpl | 6 +- .../default/LSformElement_ssh_key.tpl | 2 +- .../default/LSformElement_ssh_key_field.tpl | 8 +-- ...LSformElement_supannCompositeAttribute.tpl | 2 +- ...Element_supannCompositeAttribute_field.tpl | 18 +++--- .../LSformElement_supannLabeledValue.tpl | 2 +- ...LSformElement_supannLabeledValue_field.tpl | 14 ++--- .../default/LSformElement_text_field.tpl | 4 +- .../default/LSformElement_textarea_field.tpl | 4 +- .../default/LSformElement_uri_field.tpl | 8 +-- .../LSformElement_valueWithUnit_field.tpl | 16 ++--- public_html/templates/default/LSform_view.tpl | 22 +++---- public_html/templates/default/LSmail.tpl | 18 +++--- public_html/templates/default/LSrelations.tpl | 10 ++-- public_html/templates/default/blank.tpl | 2 +- public_html/templates/default/create.tpl | 4 +- public_html/templates/default/import.tpl | 16 ++--- public_html/templates/default/login.tpl | 20 +++---- public_html/templates/default/modify.tpl | 4 +- public_html/templates/default/question.tpl | 8 +-- .../templates/default/recoverpassword.tpl | 16 ++--- public_html/templates/default/redirect.tpl | 2 +- public_html/templates/default/select.tpl | 18 +++--- .../templates/default/select_table.tpl | 30 +++++----- public_html/templates/default/top.tpl | 16 ++--- public_html/templates/default/view.tpl | 4 +- public_html/templates/default/viewSearch.tpl | 60 +++++++++---------- 45 files changed, 242 insertions(+), 242 deletions(-) diff --git a/public_html/templates/default/LSform.tpl b/public_html/templates/default/LSform.tpl index 9d943e7f..ae6d2b4d 100644 --- a/public_html/templates/default/LSform.tpl +++ b/public_html/templates/default/LSform.tpl @@ -1,46 +1,46 @@ -
+ {$LSform_header} {if $LSform_layout} {foreach from=$LSform_layout item=tab key=tab_key} - +

{tr msg=$tab.label}

-
+
{if $LSformElement_image!='' && $tab.img==1}
{if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
    -
  • +
  • {foreach from=$LSformElement_image_actions item=item} -
  • +
  • {/foreach}
{/if} - +
{/if}
{foreach from=$tab.args item=arg} {if $LSform_fields[$arg]} -
{$LSform_fields[$arg].label}{if $LSform_fields[$arg].required} *{/if}{if $LSform_fields[$arg].help_info!=""} ?{/if}
+
{$LSform_fields[$arg].label}{if $LSform_fields[$arg].required} *{/if}{if $LSform_fields[$arg].help_info!=""} ?{/if}
{$LSform_fields[$arg].html}{if $LSform_fields[$arg].add != ''} + Ajouter un champ{/if}
{if $LSform_fields[$arg].errors != ''} {foreach from=$LSform_fields[$arg].errors item=error} -
{$error}
+
{$error|escape:'htmlall'}
{/foreach} {/if} {/if} {/foreach} -
+
@@ -51,28 +51,28 @@
{if $LSformElement_image_actions!='' && !$LSformElement_image_errors}
    -
  • +
  • {foreach from=$LSformElement_image_actions item=item} -
  • +
  • {/foreach}
{/if} - +
{/if}
{foreach from=$LSform_fields item=field} -
{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} ?{/if}
+
{$field.label}{if $field.required} *{/if}{if $field.help_info!=""} ?{/if}
{$field.html}{if $field.add != ''} + Ajouter un champ{/if}
{if $field.errors != ''} {foreach from=$field.errors item=error} -
{$error}
+
{$error|escape:'htmlall'}
{/foreach} {/if} {/foreach} -
+
diff --git a/public_html/templates/default/LSformElement.tpl b/public_html/templates/default/LSformElement.tpl index 5cd9d850..3b762471 100644 --- a/public_html/templates/default/LSformElement.tpl +++ b/public_html/templates/default/LSformElement.tpl @@ -1,4 +1,4 @@ -
    +
      {foreach from=$values item=value}
    • {include file="ls:$fieldTemplate"}
    • {foreachelse} diff --git a/public_html/templates/default/LSformElement_boolean_field.tpl b/public_html/templates/default/LSformElement_boolean_field.tpl index 36a877e3..30bc1678 100644 --- a/public_html/templates/default/LSformElement_boolean_field.tpl +++ b/public_html/templates/default/LSformElement_boolean_field.tpl @@ -1,5 +1,5 @@ {if $freeze} -{if $value=='yes'}{$yesTxt}{elseif $value=='no'}{$noTxt}{else}{$noValueTxt}{/if} +{if $value=='yes'}{$yesTxt|escape:"htmlall"}{elseif $value=='no'}{$noTxt|escape:"htmlall"}{else}{$noValueTxt|escape:"htmlall"}{/if} {else} -{$yesTxt} {$noTxt} +{$yesTxt|escape:"htmlall"} {$noTxt|escape:"htmlall"} {/if} diff --git a/public_html/templates/default/LSformElement_date_field.tpl b/public_html/templates/default/LSformElement_date_field.tpl index d2ffd173..018138bd 100644 --- a/public_html/templates/default/LSformElement_date_field.tpl +++ b/public_html/templates/default/LSformElement_date_field.tpl @@ -1,5 +1,5 @@ {if $freeze} - {if $value}{$value}{else}{$noValueTxt}{/if} + {if $value}{$value|escape:"htmlall"}{else}{$noValueTxt|escape:"htmlall"}{/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_field.tpl b/public_html/templates/default/LSformElement_field.tpl index 00604059..219c552d 100644 --- a/public_html/templates/default/LSformElement_field.tpl +++ b/public_html/templates/default/LSformElement_field.tpl @@ -1,5 +1,5 @@ {if $freeze} -{if $value}{$value}{else}{$noValueTxt}{/if} +{if $value}{$value|escape:"htmlall"}{else}{$noValueTxt|escape:"htmlall"}{/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_image_field.tpl b/public_html/templates/default/LSformElement_image_field.tpl index 5ce43646..e6cc36f2 100644 --- a/public_html/templates/default/LSformElement_image_field.tpl +++ b/public_html/templates/default/LSformElement_image_field.tpl @@ -1,3 +1,3 @@ {if !$freeze} - + {/if} diff --git a/public_html/templates/default/LSformElement_jsonCompositeAttribute.tpl b/public_html/templates/default/LSformElement_jsonCompositeAttribute.tpl index 7c1cccd9..8a5f3d8a 100644 --- a/public_html/templates/default/LSformElement_jsonCompositeAttribute.tpl +++ b/public_html/templates/default/LSformElement_jsonCompositeAttribute.tpl @@ -1,4 +1,4 @@ -
        +
          {foreach from=$parseValues item=parseValue}
        • {include file="ls:$fieldTemplate"}
        • {foreachelse} diff --git a/public_html/templates/default/LSformElement_jsonCompositeAttribute_field.tpl b/public_html/templates/default/LSformElement_jsonCompositeAttribute_field.tpl index 8b58d99e..0c8d92e7 100644 --- a/public_html/templates/default/LSformElement_jsonCompositeAttribute_field.tpl +++ b/public_html/templates/default/LSformElement_jsonCompositeAttribute_field.tpl @@ -7,33 +7,33 @@
            {if $cconf.multiple && is_array($parseValue[$c])} {foreach from=$parseValue[$c] item=cval} -
          • {$cval.translated}
          • +
          • {$cval.translated|escape:"htmlall"}
          • {/foreach} {else} -
          • {$parseValue[$c].translated}
          • +
          • {$parseValue[$c].translated|escape:"htmlall"}
          • {/if}
{/foreach} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} {uniqid var="uuid"} - + {foreach from=$components key=c item=cconf name=components} -
+
{if $cconf.type=='select_list'} - {foreach from=$cconf.possible_values key=key item=label} {if is_array($label)} {if count($label.possible_values)>0} - + {if $cconf.multiple && is_array($parseValue[$c])} {html_options options=$label.possible_values selected=$parseValue[$c]} {else} @@ -52,7 +52,7 @@ {assign var="selected" value=1} {/if} {/if} - + {/if} {/foreach} @@ -60,12 +60,12 @@
    {if $cconf.multiple && is_array($parseValue[$c])} {foreach from=$parseValue[$c] item=cval} -
  • +
  • {foreachelse} -
  • +
  • {/foreach} {else} -
  • +
  • {/if}
{/if} diff --git a/public_html/templates/default/LSformElement_labeledValue.tpl b/public_html/templates/default/LSformElement_labeledValue.tpl index 40a75c60..45ffa1d8 100644 --- a/public_html/templates/default/LSformElement_labeledValue.tpl +++ b/public_html/templates/default/LSformElement_labeledValue.tpl @@ -1,4 +1,4 @@ -
    +
      {foreach from=$parseValues item=parseValue}
    • {include file="ls:$fieldTemplate"}
    • {foreachelse} diff --git a/public_html/templates/default/LSformElement_labeledValue_field.tpl b/public_html/templates/default/LSformElement_labeledValue_field.tpl index e920c708..3c210fec 100644 --- a/public_html/templates/default/LSformElement_labeledValue_field.tpl +++ b/public_html/templates/default/LSformElement_labeledValue_field.tpl @@ -2,20 +2,20 @@ {if isset($parseValue)} {if $parseValue.label} {if $parseValue.translated_label} - {$parseValue.translated_label} + {$parseValue.translated_label|escape:"htmlall"} {else} - {$parseValue.label} {$unrecognizedLabelTxt} + {$parseValue.label|escape:"htmlall"} {$unrecognizedLabelTxt|escape:"htmlall"} {/if} - : {$parseValue.value} + : {$parseValue.value|escape:"htmlall"} {else} - {$parseValue.raw_value} {$unrecognizedValueTxt} + {$parseValue.raw_value|escape:"htmlall"} {$unrecognizedValueTxt|escape:"htmlall"} {/if} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - {html_options options=$labels selected=$parseValue.label} - + {/if} diff --git a/public_html/templates/default/LSformElement_mailQuota_field.tpl b/public_html/templates/default/LSformElement_mailQuota_field.tpl index edae538e..fa54fa8d 100644 --- a/public_html/templates/default/LSformElement_mailQuota_field.tpl +++ b/public_html/templates/default/LSformElement_mailQuota_field.tpl @@ -3,17 +3,17 @@ {if $quotas[$value].unknown} Valeur incorrecte {else} - {$quotas[$value].valueTxt} + {$quotas[$value].valueTxt|escape:"htmlall"} {/if} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - - + {if $quotas[$value].unknown} - Valeur incorrecte + {tr msg="Incorrect value"} {/if} {/if} diff --git a/public_html/templates/default/LSformElement_maildir_field.tpl b/public_html/templates/default/LSformElement_maildir_field.tpl index 2c5cd30e..f02bd244 100644 --- a/public_html/templates/default/LSformElement_maildir_field.tpl +++ b/public_html/templates/default/LSformElement_maildir_field.tpl @@ -1,5 +1,5 @@ {if $freeze} -{if $value}{$value}{else}{$noValueTxt}{/if} +{if $value}{$value|escape:"htmlall"}{else}{$noValueTxt|escape:"htmlall"}{/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_password.tpl b/public_html/templates/default/LSformElement_password.tpl index 5e8110aa..8f86afcd 100644 --- a/public_html/templates/default/LSformElement_password.tpl +++ b/public_html/templates/default/LSformElement_password.tpl @@ -1,3 +1,3 @@ -
        +
        • {include file="ls:$fieldTemplate"}
        diff --git a/public_html/templates/default/LSformElement_password_field.tpl b/public_html/templates/default/LSformElement_password_field.tpl index d94ae051..cc140d86 100644 --- a/public_html/templates/default/LSformElement_password_field.tpl +++ b/public_html/templates/default/LSformElement_password_field.tpl @@ -1,13 +1,13 @@ {if $freeze} {if $clearView} -{$pwd} +{$pwd|escape:"htmlall"} {else} ******** {/if} {else} {if $clearEdit} - + {else} - + {/if} {/if} diff --git a/public_html/templates/default/LSformElement_quota_field.tpl b/public_html/templates/default/LSformElement_quota_field.tpl index c7afd21b..4da4f767 100644 --- a/public_html/templates/default/LSformElement_quota_field.tpl +++ b/public_html/templates/default/LSformElement_quota_field.tpl @@ -1,19 +1,19 @@ {if $freeze} {if $value} {if $quotas[$value].unknown} - {$quotas[$value].unknown} + {$quotas[$value].unknown|escape:"htmlall"} {else} - {$quotas[$value].valueTxt} + {$quotas[$value].valueTxt|escape:"htmlall"} {/if} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - - + {if $quotas[$value].unknown} - {$quotas[$value].unknown} + {$quotas[$value].unknown|escape:"htmlall"} {/if} {/if} diff --git a/public_html/templates/default/LSformElement_select.tpl b/public_html/templates/default/LSformElement_select.tpl index 0fbbbda7..a303215a 100644 --- a/public_html/templates/default/LSformElement_select.tpl +++ b/public_html/templates/default/LSformElement_select.tpl @@ -1,27 +1,27 @@ -
          +
            {if $freeze} {foreach from=$values item=value} {LSformElement_select_checkIsValidValue value=$value possible_values=$possible_values} {if $LSformElement_select_isValidValue} -
          • {$LSformElement_select_isValidValue_label}
          • +
          • {$LSformElement_select_isValidValue_label|escape:"htmlall"}
          • {else}
          • {getFData format=$unrecognized_value_label_format data=$value}
          • {/if} {foreachelse} -
          • {$noValueTxt}
          • +
          • {$noValueTxt|escape:"htmlall"}
          • {/foreach} {else}
          • - {foreach from=$possible_values key=key item=label} {if is_array($label)} {if count($label.possible_values)>0} - + {html_options options=$label.possible_values selected=$values} {/if} {else} - + {/if} {/foreach} diff --git a/public_html/templates/default/LSformElement_select_box.tpl b/public_html/templates/default/LSformElement_select_box.tpl index 2a4720d9..250a70cd 100644 --- a/public_html/templates/default/LSformElement_select_box.tpl +++ b/public_html/templates/default/LSformElement_select_box.tpl @@ -1,25 +1,25 @@ -
              +
                {if $freeze} {foreach from=$values item=value} {LSformElement_select_checkIsValidValue value=$value possible_values=$possible_values} {if $LSformElement_select_isValidValue} -
              • {$LSformElement_select_isValidValue_label}
              • +
              • {$LSformElement_select_isValidValue_label|escape:"htmlall"}
              • {else}
              • {getFData format=$unrecognized_value_label_format data=$value}
              • {/if} {foreachelse} -
              • {$noValueTxt}
              • +
              • {$noValueTxt|escape:"htmlall"}
              • {/foreach} {else} {foreach from=$possible_values item=label key=value name=LSformElement_selectbox} {if is_array($label)} {if count($label.possible_values)>0}
              • - {$label.label} : + {$label.label|escape:"htmlall"} :
                  {foreach from=$label.possible_values item=l key=v name=LSformElement_selectbox_sub_values}
                • - +
                • {/foreach}
                @@ -27,7 +27,7 @@ {/if} {else}
              • - +
              • {/if} {/foreach} diff --git a/public_html/templates/default/LSformElement_select_object.tpl b/public_html/templates/default/LSformElement_select_object.tpl index 92fa3f05..59f922f7 100644 --- a/public_html/templates/default/LSformElement_select_object.tpl +++ b/public_html/templates/default/LSformElement_select_object.tpl @@ -3,7 +3,7 @@ {/if} -
                  +
                    {foreach from=$values item=txt key=dn}
                  • {include file="ls:$fieldTemplate"}
                  • {foreachelse} diff --git a/public_html/templates/default/LSformElement_select_object_field.tpl b/public_html/templates/default/LSformElement_select_object_field.tpl index f132dd72..2970e440 100644 --- a/public_html/templates/default/LSformElement_select_object_field.tpl +++ b/public_html/templates/default/LSformElement_select_object_field.tpl @@ -1,6 +1,6 @@ {if $dn} - {$txt} - {if !$freeze}{/if} + {$txt|escape:"htmlall"} + {if !$freeze}{/if} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} diff --git a/public_html/templates/default/LSformElement_ssh_key.tpl b/public_html/templates/default/LSformElement_ssh_key.tpl index eac135be..cebea848 100644 --- a/public_html/templates/default/LSformElement_ssh_key.tpl +++ b/public_html/templates/default/LSformElement_ssh_key.tpl @@ -1,4 +1,4 @@ -
                      +
                        {foreach from=$values_txt item=value}
                      • {include file="ls:$fieldTemplate"}
                      • {foreachelse} diff --git a/public_html/templates/default/LSformElement_ssh_key_field.tpl b/public_html/templates/default/LSformElement_ssh_key_field.tpl index 6a4cef82..9f702bcc 100644 --- a/public_html/templates/default/LSformElement_ssh_key_field.tpl +++ b/public_html/templates/default/LSformElement_ssh_key_field.tpl @@ -1,11 +1,11 @@ {if $freeze} {if $value.type} - {$value.shortTxt}... (Type : {$value.type}) {$value.mail}

                        {$value.value}

                        + {$value.shortTxt|escape:"htmlall"}... (Type : {$value.type|escape:"htmlall"}) {$value.mail|escape:"htmlall"}

                        {$value.value|escape:"htmlall"}

                        {elseif $value.shortTxt} - {$value.shortTxt}... ({$unknowTypeTxt})

                        {$value.value}

                        + {$value.shortTxt|escape:"htmlall"}... ({$unknowTypeTxt|escape:"htmlall"})

                        {$value.value|escape:"htmlall"}

                        {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_supannCompositeAttribute.tpl b/public_html/templates/default/LSformElement_supannCompositeAttribute.tpl index 204c926a..ad01b778 100644 --- a/public_html/templates/default/LSformElement_supannCompositeAttribute.tpl +++ b/public_html/templates/default/LSformElement_supannCompositeAttribute.tpl @@ -1,4 +1,4 @@ -
                          +
                            {foreach from=$parseValues item=parseValue}
                          • {include file="ls:$fieldTemplate"}
                          • {foreachelse} diff --git a/public_html/templates/default/LSformElement_supannCompositeAttribute_field.tpl b/public_html/templates/default/LSformElement_supannCompositeAttribute_field.tpl index 3a6713e8..98ced4e9 100644 --- a/public_html/templates/default/LSformElement_supannCompositeAttribute_field.tpl +++ b/public_html/templates/default/LSformElement_supannCompositeAttribute_field.tpl @@ -6,31 +6,31 @@ {if !empty($parseValue[$c].label) and $parseValue[$c].label!='no'} {assign var=clabel value=$parseValue[$c].label} - [{$clabel}] + [{$clabel|escape:"htmlall"}] {/if} - {$parseValue[$c].translated} + {$parseValue[$c].translated|escape:"htmlall"}

                            {/foreach} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} {foreach $components as $c => $cconf} -

                            +

                            {if $cconf.type=='table' or $cconf.type=='codeEntite'} - + {if $parseValue and !empty($parseValue[$c].label) and $parseValue[$c].label!='no'} {assign var=clabel value=$parseValue[$c].label} - [{$clabel}] + [{$clabel|escape:"htmlall"}] {/if} {if $parseValue} - {$parseValue[$c].translated} + {$parseValue[$c].translated|escape:"htmlall"} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - + {/if}

                            {/foreach} diff --git a/public_html/templates/default/LSformElement_supannLabeledValue.tpl b/public_html/templates/default/LSformElement_supannLabeledValue.tpl index 77e2d85f..de6be301 100644 --- a/public_html/templates/default/LSformElement_supannLabeledValue.tpl +++ b/public_html/templates/default/LSformElement_supannLabeledValue.tpl @@ -1,4 +1,4 @@ -
                              +
                                {foreach from=$parseValues item=parseValue}
                              • {include file="ls:$fieldTemplate"}
                              • {foreachelse} diff --git a/public_html/templates/default/LSformElement_supannLabeledValue_field.tpl b/public_html/templates/default/LSformElement_supannLabeledValue_field.tpl index 3c597ed0..754e0698 100644 --- a/public_html/templates/default/LSformElement_supannLabeledValue_field.tpl +++ b/public_html/templates/default/LSformElement_supannLabeledValue_field.tpl @@ -2,21 +2,21 @@ {if isset($parseValue)} {if !empty($parseValue.label) and $parseValue.label!='no'} {assign var=clabel value=$parseValue.label} - [{$clabel}] + [{$clabel|escape:"htmlall"}] {/if} - {$parseValue.translated} + {$parseValue.translated|escape:"htmlall"} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} - + {if $parseValue and !empty($parseValue.label) and $parseValue.label!='no'} {assign var=clabel value=$parseValue.label} - [{$clabel}] + [{$clabel|escape:"htmlall"}] {/if} {if $parseValue} - {$parseValue.translated} + {$parseValue.translated|escape:"htmlall"} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {/if} diff --git a/public_html/templates/default/LSformElement_text_field.tpl b/public_html/templates/default/LSformElement_text_field.tpl index 5df9fe1a..3b2dfc96 100644 --- a/public_html/templates/default/LSformElement_text_field.tpl +++ b/public_html/templates/default/LSformElement_text_field.tpl @@ -1,5 +1,5 @@ {if $freeze} -{if $value}{$value}{else}{$noValueTxt}{/if} +{if $value}{$value|escape:"htmlall"}{else}{$noValueTxt|escape:"htmlall"}{/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_textarea_field.tpl b/public_html/templates/default/LSformElement_textarea_field.tpl index d5bc82bb..50ebdc4f 100644 --- a/public_html/templates/default/LSformElement_textarea_field.tpl +++ b/public_html/templates/default/LSformElement_textarea_field.tpl @@ -1,5 +1,5 @@ {if $freeze} -{if $value}

                                {$value}

                                {else}{$noValueTxt}{/if} +{if $value}

                                {$value|escape:"htmlall"}

                                {else}{$noValueTxt|escape:"htmlall"}{/if} {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_uri_field.tpl b/public_html/templates/default/LSformElement_uri_field.tpl index 5b7d9459..93855c7d 100644 --- a/public_html/templates/default/LSformElement_uri_field.tpl +++ b/public_html/templates/default/LSformElement_uri_field.tpl @@ -1,12 +1,12 @@ {if $freeze} {if $value} - {$value} + {$value|escape:"htmlall"} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} - + {else} - + {/if} diff --git a/public_html/templates/default/LSformElement_valueWithUnit_field.tpl b/public_html/templates/default/LSformElement_valueWithUnit_field.tpl index cb39e0fd..f871fd7d 100644 --- a/public_html/templates/default/LSformElement_valueWithUnit_field.tpl +++ b/public_html/templates/default/LSformElement_valueWithUnit_field.tpl @@ -1,27 +1,27 @@ {if $freeze} {if $value} {if $values_and_units[$value].unknown} - {$values_and_units[$value].unknown} + {$values_and_units[$value].unknown|escape:"htmlall"} {else} {if $values_and_units[$value].valueWithUnit} - {$values_and_units[$value].valueWithUnit}{$values_and_units[$value].unitLabel} + {$values_and_units[$value].valueWithUnit|escape:"htmlall"}{$values_and_units[$value].unitLabel|escape:"htmlall"} {else} - {$values_and_units[$value].value} + {$values_and_units[$value].value|escape:"htmlall"} {/if} {/if} {else} - {$noValueTxt} + {$noValueTxt|escape:"htmlall"} {/if} {else} {if $values_and_units[$value].valueWithUnit || !$values_and_units[$value]} - - + {else} - + {/if} {if $values_and_units[$value].unknown} - {$values_and_units[$value].unknown} + {$values_and_units[$value].unknown|escape:"htmlall"} {/if} {/if} diff --git a/public_html/templates/default/LSform_view.tpl b/public_html/templates/default/LSform_view.tpl index d24a588a..7b1f0c42 100644 --- a/public_html/templates/default/LSform_view.tpl +++ b/public_html/templates/default/LSform_view.tpl @@ -1,23 +1,23 @@ - - + + {if $LSform_layout} {foreach from=$LSform_layout item=tab key=tab_key} - -

                                {$tab.label}

                                -
                                + +

                                {$tab.label|escape:"htmlall"}

                                +
                                {if $LSformElement_image!='' && $tab.img==1}
                                - +
                                {/if} @@ -26,12 +26,12 @@ {foreach from=$tab.args item=arg} {if $LSform_fields[$arg]} {assign var='field' value='oui'} -
                                {$LSform_fields[$arg].label}
                                +
                                {$LSform_fields[$arg].label|escape:"htmlall"}
                                {$LSform_fields[$arg].html}
                                {/if} {/foreach} {if $field=='non'} -
                                {$LSform_layout_nofield_label}
                                +
                                {$LSform_layout_nofield_label|escape:"htmlall"}
                                {/if} @@ -42,14 +42,14 @@ {if $LSformElement_image!=''}
                                - +
                                {/if}
                                {foreach from=$LSform_fields item=field} -
                                {$field.label}
                                +
                                {$field.label|escape:"htmlall"}
                                {$field.html}
                                {/foreach}
                                diff --git a/public_html/templates/default/LSmail.tpl b/public_html/templates/default/LSmail.tpl index 66bb0023..81c235ba 100644 --- a/public_html/templates/default/LSmail.tpl +++ b/public_html/templates/default/LSmail.tpl @@ -1,10 +1,10 @@ -
                                +
                                {if $LSmail_options.display_mail_field} -
                                {$LSmail_mail_label}
                                +
                                {$LSmail_mail_label|escape:"htmlall"}
                                {if $LSmail_mails != ""} {if $LSmail_mails|@count==1} - + {else} + {/if} {if $LSmail_options.display_subject_field} -
                                {$LSmail_subject_label}
                                +
                                {$LSmail_subject_label|escape:"htmlall"}
                                - +
                                {else} - + {/if} -
                                {$LSmail_msg_label}
                                +
                                {$LSmail_msg_label|escape:"htmlall"}
                                - +
                                diff --git a/public_html/templates/default/LSrelations.tpl b/public_html/templates/default/LSrelations.tpl index c16b3b60..548eca2a 100644 --- a/public_html/templates/default/LSrelations.tpl +++ b/public_html/templates/default/LSrelations.tpl @@ -1,15 +1,15 @@ -

                                {$item.label}

                                +

                                {$item.label|escape:"htmlall"}

                                {if $item.actions!=''} {/if} -
                                  + diff --git a/public_html/templates/default/blank.tpl b/public_html/templates/default/blank.tpl index 95bec16a..d2d94850 100644 --- a/public_html/templates/default/blank.tpl +++ b/public_html/templates/default/blank.tpl @@ -3,7 +3,7 @@ - LdapSaisie{if $pagetitle != ''} - {$pagetitle}{/if} + LdapSaisie{if $pagetitle != ''} - {$pagetitle|escape:"htmlall"}{/if} diff --git a/public_html/templates/default/create.tpl b/public_html/templates/default/create.tpl index 5c674bd8..e414a983 100644 --- a/public_html/templates/default/create.tpl +++ b/public_html/templates/default/create.tpl @@ -1,8 +1,8 @@ {include file='ls:top.tpl'} - {if $pagetitle != ''}

                                  {$pagetitle}

                                  {/if} + {if $pagetitle != ''}

                                  {$pagetitle|escape:"htmlall"}

                                  {/if} {if !empty($listAvailableDataEntryForm)} -

                                  @@ -38,12 +38,12 @@
                                    {foreach $error.data as $key => $val}
                                  • - {$key} : + {$key|escape:"htmlall"} : {if empty($val)}{tr msg='No value'}{else}{LSimport_implodeValues values=$val}{/if} {if isset($error.errors.attrs[$key])}
                                      {foreach $error.errors.attrs.$key as $e} -
                                    • {$e}
                                    • +
                                    • {$e|escape:"htmlall"}
                                    • {/foreach}
                                    {/if} @@ -52,10 +52,10 @@ {foreach $error.errors.attrs as $a => $es} {if !in_array($a,$error.data)}
                                  • - {$a} : + {$a|escape:"htmlall"} :
                                      {foreach $es as $e} -
                                    • {$e}
                                    • +
                                    • {$e|escape:"htmlall"}
                                    • {/foreach}
                                  • @@ -69,7 +69,7 @@

                                    {tr msg='Imported objects'} ({count($result.imported)})

                                      {foreach $result.imported as $dn => $name} -
                                    • {$name}
                                    • +
                                    • {$name|escape:"htmlall"}
                                    • {foreachelse}
                                    • {tr msg='No imported object'}
                                    • {/foreach} @@ -79,7 +79,7 @@

                                      {tr msg='Updated objects'} ({count($result.updated)})

                                      {/if} diff --git a/public_html/templates/default/login.tpl b/public_html/templates/default/login.tpl index 3a4c88a7..1e1c60e9 100644 --- a/public_html/templates/default/login.tpl +++ b/public_html/templates/default/login.tpl @@ -3,7 +3,7 @@ - LdapSaisie{if $pagetitle != ''} - {$pagetitle}{/if} + LdapSaisie{if $pagetitle != ''} - {$pagetitle|escape:"htmlall"}{/if} {$LSsession_css} @@ -18,29 +18,29 @@
                                      -
                                      {$loginform_label_ldapserver}
                                      +
                                      {$loginform_label_ldapserver|escape:"htmlall"}
                                      -
                                      {$loginform_label_level}
                                      +
                                      {$loginform_label_level|escape:"htmlall"}
                                      -
                                      {$loginform_label_user}
                                      +
                                      {$loginform_label_user|escape:"htmlall"}
                                      -
                                      {$loginform_label_pwd}
                                      +
                                      {$loginform_label_pwd|escape:"htmlall"}
                                      -
                                      {$lang_label}
                                      +
                                      {$lang_label|escape:"htmlall"}
                                      -
                                      +
                                      -{$lang_label} : {$LSlang} -{$loginform_label_recoverPassword} +{$lang_label} : {$LSlang|escape:"htmlall"} +{$loginform_label_recoverPassword|escape:"htmlall"}
                                diff --git a/public_html/templates/default/modify.tpl b/public_html/templates/default/modify.tpl index e422ea42..0c0f3740 100644 --- a/public_html/templates/default/modify.tpl +++ b/public_html/templates/default/modify.tpl @@ -1,9 +1,9 @@ {include file='ls:top.tpl'} - {if $pagetitle != ''}

                                {$pagetitle}

                                {/if} + {if $pagetitle != ''}

                                {$pagetitle|escape:"htmlall"}

                                {/if} {if $LSview_actions != ''} {/if} diff --git a/public_html/templates/default/question.tpl b/public_html/templates/default/question.tpl index 7177b721..8519a6e7 100644 --- a/public_html/templates/default/question.tpl +++ b/public_html/templates/default/question.tpl @@ -1,13 +1,13 @@ {include file='ls:top.tpl'} - {if $pagetitle != ''}

                                {$pagetitle}

                                {/if} + {if $pagetitle != ''}

                                {$pagetitle|escape:"htmlall"}

                                {/if} {if $LSview_actions != ''}

                                {foreach from=$LSview_actions item=item} - {$item.label} + {$item.label|escape:"htmlall"} {/foreach}

                                {/if} -

                                {$question}

                                - {$validation_label} +

                                {$question|escape:"htmlall"}

                                + {$validation_label|escape:"htmlall"} {include file='ls:bottom.tpl'} diff --git a/public_html/templates/default/recoverpassword.tpl b/public_html/templates/default/recoverpassword.tpl index 6a8eb286..e1bc9bdc 100644 --- a/public_html/templates/default/recoverpassword.tpl +++ b/public_html/templates/default/recoverpassword.tpl @@ -3,7 +3,7 @@ - LdapSaisie{if $pagetitle != ''} - {$pagetitle}{/if} + LdapSaisie{if $pagetitle != ''} - {$pagetitle|escape:"htmlall"}{/if} {$LSsession_css} {$LSsession_js} @@ -15,21 +15,21 @@
                                -
                                +
                                -
                                {$recoverpasswordform_label_ldapserver}
                                +
                                {$recoverpasswordform_label_ldapserver|escape:"htmlall"}
                                -
                                {$recoverpasswordform_label_user}
                                +
                                {$recoverpasswordform_label_user|escape:"htmlall"}
                                -
                                +
                                -

                                {$recoverpassword_msg}

                                -{$lang_label} : {$LSlang} -{$recoverpasswordform_label_back} +

                                {$recoverpassword_msg|escape:"htmlall"}

                                +{$lang_label|escape:"htmlall"} : {$LSlang|escape:"htmlall"} +{$recoverpasswordform_label_back|escape:"htmlall"}
                                diff --git a/public_html/templates/default/redirect.tpl b/public_html/templates/default/redirect.tpl index f3801eda..8992afeb 100644 --- a/public_html/templates/default/redirect.tpl +++ b/public_html/templates/default/redirect.tpl @@ -3,7 +3,7 @@ - + LdapSaisie - Redirection diff --git a/public_html/templates/default/select.tpl b/public_html/templates/default/select.tpl index 71ff7e9c..72551798 100644 --- a/public_html/templates/default/select.tpl +++ b/public_html/templates/default/select.tpl @@ -1,27 +1,27 @@

                                - {$pagetitle} + {$pagetitle|escape:"htmlall"}

                                -