Skip to content

URLs in the HTML content are not properly replaced and return a 404 #4

@fnicollet

Description

@fnicollet

Content returned by the PISTE servers look like:

<div id="frontal">

  <link type="text/css" rel="stylesheet" href="https://static.piste.gouv.fr:443/captchEtat/css/bdc-layout-stylesheet.css" />
  <div class="BDC_CaptchaDiv " id="captchaFR_CaptchaDiv" style="width: 280px !important; height: 75px !important; "><!--
 --><div class="BDC_CaptchaImageDiv" id="captchaFR_CaptchaImageDiv" style="width: 250px !important; height: 75px !important;"><!--
   --><img class="BDC_CaptchaImage" id="captchaFR_CaptchaImage" src="/api/simple-captcha-endpoint?get=image&amp;c=captchaFR&amp;t=757eea682fb24b098bdcb6ff49a795ac" alt="Recopier le code de sécurité de cette image" style="visibility: hidden !important" /><!--
 --></div><!--
 --><div class="BDC_CaptchaIconsDiv" id="captchaFR_CaptchaIconsDiv" style="width: 24px !important;"><!--
   --><a class="BDC_ReloadLink" id="captchaFR_ReloadLink" role="button" tabindex="0" href="#" title="Générer un nouveau captcha"><img class="BDC_ReloadIcon" id="captchaFR_ReloadIcon" src="https://static.piste.gouv.fr:443/captchEtat/images/bdc-reload-icon.gif" alt="Générer un nouveau captcha" /></a><!--
   --><a rel="nofollow" class="BDC_SoundLink" id="captchaFR_SoundLink" role="button" tabindex="0" href="/api/simple-captcha-endpoint?get=sound&amp;c=captchaFR&amp;t=xxxxxxxxxxxxxxxxxxxxxxxxx" title="Énoncer le code du captcha"><img class="BDC_SoundIcon" id="captchaFR_SoundIcon" src="https://static.piste.gouv.fr:443/captchEtat/images/bdc-sound-icon.gif" alt="Énoncer le code du captcha" /></a><!--
   --><div class="BDC_Placeholder" id="captchaFR_AudioPlaceholder">&amp;nbsp;</div><!-- --></div>
   <script src="/api/simple-captcha-endpoint?get=script-include&amp;c=captchaFR&amp;t=xxxxxxxxxxxxxxxxxxx" type="text/javascript"></script>
   <input type="hidden" id="BDC_VCID_captchaFR" name="BDC_VCID_captchaFR" value="xxxxxxxxxxxxxxxxx" />
   <input type="hidden" id="BDC_BackWorkaround_captchaFR" name="BDC_BackWorkaround_captchaFR" value="0" />
   <input type="hidden" id="BDC_Hs_captchaFR" name="BDC_Hs_captchaFR" value="xxxxxxxxxxxxxxxxx" />
   <input type="hidden" id="BDC_SP_captchaFR" name="BDC_SP_captchaFR" value="xxxxxxxxxxxx" />

  </div>
</div>

URLs starting with "/api/simple-captcha-endpoint" to not get replaced and end up 404 (unless you magically have an endpoints which matches).
Not sure if this code actually tries to replace those URLs, but it doesn't work:
https://github.com/captcha-com/jquery-captcha/blob/master/src/jquery-captcha.js#L153

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions