Skip to content

Commit

Permalink
Merge pull request #27 from FriendlyCaptcha/remove-debug-message-on-i…
Browse files Browse the repository at this point in the history
…gnored-message

No longer debug print messages received from different origins
  • Loading branch information
gzuidhof authored Dec 12, 2024
2 parents c353534 + cd6a2d8 commit 1d739f5
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# changelog

## 0.1.14

* Removed debug message printed to console when a message was ignored from a non-Friendly Captcha iframe source.

## 0.1.13

* Remove patching of `Promise.prototype.constructor` to avoid issues with Angular and other libraries that extend or overwrite `Promise`.
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@friendlycaptcha/sdk",
"version": "0.1.13",
"version": "0.1.14",
"description": "In-browser SDK for Friendly Captcha v2 (currently in preview only)",
"main": "dist/sdk.js",
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions src/communication/bus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ export class CommunicationBus {
private onReceive(ev: MessageEvent) {
if (!isAllowedOrigin(ev.origin, this.origins)) {
// This may be an attempt at abuse or it's simply another iframe sending messages.
// We silently ignore the message. For dev purposes we currently print a debug message.
console.debug("Friendly Captcha communication bus ignored message from origin " + ev.origin, this.origins);
// We silently ignore the message. For dev purposes we can print a debug message.
// console.debug("Friendly Captcha communication bus ignored message from origin " + ev.origin, this.origins);
return;
}

Expand Down

0 comments on commit 1d739f5

Please sign in to comment.