mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
Useful for Web APIs and all other kinds of things. API changes: - Added public CHTTPSock::GetURI() method - Added public CModule::ValidateWebRequestCSRFCheck() method - Made CWebSock::GetCSRFCheck() method public so it can be accessed from CModule - Added public CWebSock::ValidateCSRFCheck() method Other changes: - Added a Sample Web API module (modules/samplewebapi.cpp) and a simple web form with no CSRF check. Implements feature request #1180.
22 lines
627 B
Cheetah
22 lines
627 B
Cheetah
<? INC Header.tmpl ?>
|
|
|
|
<form method="post" action="<? VAR URIPrefix TOP ?><? VAR ModPath ?>">
|
|
<div class="section">
|
|
<h3>Sample Web API</h3>
|
|
<div class="sectionbg">
|
|
<div class="sectionbody">
|
|
<div class="subsection full">
|
|
<div class="inputlabel">Text:</div>
|
|
<textarea name="text" cols="70" rows="5" class="monospace"></textarea>
|
|
<br /><span class="info">Sample text that will be returned plain on submit/API request.</span>
|
|
</div>
|
|
<div class="subsection submitline">
|
|
<input type="submit" name="submit" value="Submit" />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<? INC Footer.tmpl ?>
|