Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fnicollet opened this issue Sep 18, 2022 · 0 comments · May be fixed by #5
Open

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

fnicollet opened this issue Sep 18, 2022 · 0 comments · May be fixed by #5

Comments

@fnicollet
Copy link

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

fnicollet added a commit to fnicollet/jquery-captcha that referenced this issue Sep 18, 2022
@fnicollet fnicollet linked a pull request Sep 18, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant