apache - Prevent access to CGI scripts based on the source of the HTML form -


i have website, powered modx, centered around form. access webpage form restricted registered members (handled modx). user fills out few text entries, selects file upload, hits submit. specified action submit.py cgi script under /cgi-bin logs submitted information , saves file, , executes perfectly.

the concern have any form (apparently), if specify right url <form> action attribute, seems able link form cgi script. meaning can write following on own page:

<form action="http://my-site.com/cgi-bin/submit.py">     <!-- blah blah blah --> </form> 

and data sent cgi form , processed (undesirable behavior).

my question this: there way restrict execution of script based on html form sent data? missing obvious?

i've searched online , found related issue of csrf, if there's way apart token authentication prevent unauthorized use of cgi script, love hear it.

you can make once use token must sent form ensure valid (this mentioned).

though grabbed , sent well.

checking referrer isn't useful because spoofed, or absent (some proxies filter it).

in short, without using token mitigate it, in trouble. except else on web has problem :)


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -