(formAction, htmlCode)
| 186 | |
| 187 | |
| 188 | def FindAuthenticityToken(formAction, htmlCode): |
| 189 | # search for <form action="(...)" ... <input name="authenticity_token" value="(...)"> |
| 190 | regex = re.compile(r'action="(.+?)".*?name="authenticity_token" value="(.+?)"') |
| 191 | matches = regex.findall(htmlCode) |
| 192 | |
| 193 | for action, token in matches: |
| 194 | if action == formAction: |
| 195 | return token |
| 196 | |
| 197 | |
| 198 | def FindOauthCode(redirectUri): |
no outgoing calls
no test coverage detected