jbonfardeci / ShockoutForms

SharePoint + Knockout MVVM forms - an InfoPath killer
32 stars 8 forks source link

Validation #22

Open leolorenzoluis opened 8 years ago

leolorenzoluis commented 8 years ago

How do you protect the forms data from being hijacked at runtime if the soap and rest services doesn't perform server side validation?

For example,the form is submitted and is now read only. However, someone can manipulate runtime and modify the data by just adding a breakpoint in save and change the data or by pass client side validation?

jbonfardeci commented 8 years ago

All input elements are removed from the DOM in read-only mode, and you can’t add an HTML element with a data-bind attribute after Knockout has applied all bindings to the DOM. However, it is possible for a hacker to alter the Knockout view model, updating the value of one or more observables. This is also a problem with InfoPath forms in the browser.

The only methods I know of to mitigate such a scenario include:

On Jun 26, 2016, at 9:18 PM, leolorenzoluis notifications@github.com wrote:

How do you protect the forms data from being hijacked at runtime if the soap and rest services doesn't perform server side validation?

For example,the form is submitted and is now read only. However, someone can manipulate runtime and modify the data by just adding a breakpoint in save and change the data or by pass client side validation?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbonfardeci/ShockoutForms/issues/22, or mute the thread https://github.com/notifications/unsubscribe/AGpYcMcN0x8JkCEBUMlgLfYnsHryvrYmks5qPzL7gaJpZM4I-tZ-.

jbonfardeci commented 8 years ago

You could also enforce check out for list items. For example, if the form is checked out to someone else, such as an approver, someone can’t modify their list items. You can also create a custom SharePoint permission level; I created one called “Read and Post” some years ago, which prevents users from deleting or editing list items. Also be sure to set up your list permissions correctly, giving non-approvers permission to only read an update their list items. Anyone with Manage Hierarchy and above can view and update all list items.

There are other ways to update list items with REST clients, as long as the user has permissions to

On Jun 26, 2016, at 9:18 PM, leolorenzoluis notifications@github.com wrote:

How do you protect the forms data from being hijacked at runtime if the soap and rest services doesn't perform server side validation?

For example,the form is submitted and is now read only. However, someone can manipulate runtime and modify the data by just adding a breakpoint in save and change the data or by pass client side validation?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jbonfardeci/ShockoutForms/issues/22, or mute the thread https://github.com/notifications/unsubscribe/AGpYcMcN0x8JkCEBUMlgLfYnsHryvrYmks5qPzL7gaJpZM4I-tZ-.