Revigniter V2 sanitizing issue

Are you using LiveCode to create server scripts or CGIs?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Ralf Bitter
Posts: 17
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter V2 sanitizing issue

Post by Ralf Bitter » Thu Dec 09, 2021 10:25 pm

Hi istech,

I don’t think it has to do with your installation.
There is something else you should pay attention to,
and that is the usage of libURLFormData when posting
arrayencoded arrays. Here is what I do:

Code: Select all

put JSONToArray(tJSON) into tJsonA

set the httpHeaders to "Content-Type: application/lc.array"

post libURLFormData("testPOST", base64Encode(the arrayencode of tJsonA)) to URL "http://example.com/istechInputTest"
or in case the data should be compressed

Code: Select all

put JSONToArray(tJSON) into tJsonA

set the httpHeaders to "Content-Type: application/lc.array.compressed"

post libURLFormData("testPOST", base64Encode(the compress of the arrayencode of tJsonA)) to URL "http://example.com/istechInputTest"
server code example

Code: Select all

put $_POST["testPOST"] into tData

put "todo =" && tData["link"]["todo"]
Please let me know if this helps.
Ralf

istech
Posts: 177
Joined: Thu Sep 19, 2013 10:08 am

Re: Revigniter V2 sanitizing issue

Post by istech » Sat Dec 18, 2021 12:58 pm

Hi Ralf,

Apologies for not getting back to you sooner as I was away on business.

I can confirm this solution works for my situation. But still interested in the why.

Should I be posting as form data for Revigniter? Of is this more of a workaround for my situation.

No hurry, as just for my understanding of the problem I was facing.

Again many thanks for your time.

Ralf Bitter
Posts: 17
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter V2 sanitizing issue

Post by Ralf Bitter » Sun Dec 19, 2021 2:54 pm

Hi istech,

sorry for the late reply. Yes, using libURLFormData() is currently a
requirement for posting LC arrays to revigniter. But I have been messing
around with the code of the Input library and can tell this will change
with the next release.

This means that one will be able to post LC arrays without having to use
the libURLFormData() function. Also, one will be able to use libURLFormData()
to post JSON data, which is currently not possible. All these restrictions will
be removed.

The next release is in the pipe line.
Ralf

istech
Posts: 177
Joined: Thu Sep 19, 2013 10:08 am

Re: Revigniter V2 sanitizing issue

Post by istech » Tue Dec 21, 2021 10:19 pm

Ahh Great!!

Looking forward to it.

Again thanks for your dedication and time.

Ralf Bitter
Posts: 17
Joined: Mon Aug 26, 2013 6:49 pm

Re: Revigniter V2 sanitizing issue

Post by Ralf Bitter » Wed Dec 22, 2021 9:44 am

Hi istech,

the new release (version 2.3.3) can be downloaded here:

https://revigniter.com/

or here:

https://github.com/revig/revigniter/
Ralf

istech
Posts: 177
Joined: Thu Sep 19, 2013 10:08 am

Re: Revigniter V2 sanitizing issue

Post by istech » Fri Jan 28, 2022 1:35 pm

Hi Ralf,

Sorry for the late reply will be testing this shortly. Thanks for all your great work and will let you know if I find any problems.

Post Reply

Return to “CGIs and the Server”