Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    [bug] operationBinding.criteria ignored for update and remove operations

    SmartClient Version: v8.3p_2013-06-22/PowerEdition Deployment (built 2013-06-22)

    if I add a criteria in a remove or update operation, say
    Code:
            <operationBinding operationType="update">
                <criteria fieldName="LISTINO_TYPE" operator="equals" value="1"></criteria>
            </operationBinding>
    and then execute an update:
    Code:
    JPC_LISTINI.updateData({ID_REC:465725, DESCRIZIONE:'TEST UPDATE'})
    it isn't used in the sql where clause:
    Code:
    2013-06-28 15:39:43,798 INFO  SQLDriver [builtinApplication.JPC_LISTINI_update] Executing SQL update on 'dbJpcEP': UPDATE DBSALES.JPC_LISTINI SET DESCRIZIONE='TEST UPDATE', ID_REC=465725 WHERE (JPC_LISTINI.ID_REC=465725)
    why? I think that it must be used, even if the primary key is present, because, quoting from operationBinding.criteria docs:
    Code:
    The effect of this is to apply any criteria specifed here as additional constraints on top of what the user has specified, and of course, the user is unable to affect this. Thus, this is a suitable and convenient place to enforce rules such as "Users can only ever see their own records".
    and the primary key could be guessed by an attacker.

    #2
    We've fixed this problem. The fix will be present in 8.3 and 9.0 builds as of tomorrow, 7/3

    Comment


      #3
      SmartClient Version: v8.3p_2013-07-03/PowerEdition Deployment (built 2013-07-03)

      verified, thank you very much

      Comment

      Working...
      X