Injection safe call to IAxaptaRecord.ExecuteStmt()

后端 未结 2 619
花落未央
花落未央 2021-01-21 21:50

Is there an injection safe way to call via the axpata business connector

string salesId = someObject.Text;

IAxaptaRecord salesLine = ax.CreateRecord(\"SalesLine         


        
相关标签:
2条回答
  • 2021-01-21 22:03

    There is no way to be sure you have covered all cases ...

    Using ExecuteStmt is most likely the wrong approach. You should write your select or whatever in an Axapta method (with parameters) then call that method.

    0 讨论(0)
  • 2021-01-21 22:16

    you should do a replace on ' to \' e.g.

    string salesId = someObject.Text.Replace("'", "\\'");
    
    0 讨论(0)
提交回复
热议问题