Revert "Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk"
This reverts commit 0add8bedbc.
This commit is contained in:
@@ -16,9 +16,10 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
|
||||
import org.apache.ofbiz.entity.Delegator
|
||||
import org.apache.ofbiz.security.Security
|
||||
import org.apache.ofbiz.entity.jdbc.DatabaseUtil
|
||||
import org.apache.ofbiz.entity.model.ModelEntity
|
||||
|
||||
controlPath = parameters._CONTROL_PATH_
|
||||
|
||||
@@ -113,7 +114,7 @@ if (security.hasPermission("ENTITY_MAINT", session)) {
|
||||
miter = messages.iterator()
|
||||
context.miters = miter
|
||||
}
|
||||
context.checkDbURL = "view/checkdb"
|
||||
context.encodeURLCheckDb = response.encodeURL(controlPath + "/view/checkdb")
|
||||
context.groupName = groupName ?: "org.apache.ofbiz"
|
||||
context.entityName = entityName ?: ""
|
||||
}
|
||||
|
||||
@@ -16,8 +16,6 @@
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
import org.apache.ofbiz.security.CsrfUtil;
|
||||
|
||||
controlPath = parameters._CONTROL_PATH_
|
||||
list = "$controlPath/view/entityref_list"
|
||||
main = "$controlPath/view/entityref_main"
|
||||
@@ -31,9 +29,5 @@ if (search) {
|
||||
list = "$list?forstatic=$forstatic"
|
||||
main = "$main?forstatic=$forstatic"
|
||||
}
|
||||
tokenList = CsrfUtil.generateTokenForNonAjax(request, "view/entityref_list")
|
||||
tokenMain = CsrfUtil.generateTokenForNonAjax(request, "view/entityref_main")
|
||||
list = CsrfUtil.addOrUpdateTokenInUrl(list, tokenList)
|
||||
main = CsrfUtil.addOrUpdateTokenInUrl(main, tokenMain)
|
||||
context.encodeUrlList = response.encodeURL(list)
|
||||
context.encodeUrlMain = response.encodeURL(main)
|
||||
|
||||
Reference in New Issue
Block a user