You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@eventmesh.apache.org by ch...@apache.org on 2023/01/13 12:45:16 UTC

[incubator-eventmesh] branch fix-go-server-security-issue updated (c2609fdc8 -> ca1ec8769)

This is an automated email from the ASF dual-hosted git repository.

chenzhou pushed a change to branch fix-go-server-security-issue
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git


 discard c2609fdc8 fix go server security issue
     new ca1ec8769 fix go server security issue

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (c2609fdc8)
            \
             N -- N -- N   refs/heads/fix-go-server-security-issue (ca1ec8769)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 eventmesh-server-go/examples/webhook/main.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org


[incubator-eventmesh] 01/01: fix go server security issue

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chenzhou pushed a commit to branch fix-go-server-security-issue
in repository https://gitbox.apache.org/repos/asf/incubator-eventmesh.git

commit ca1ec87697178128d178a88fa3d70548ee700801
Author: horoc <ho...@gmail.com>
AuthorDate: Fri Jan 13 20:44:11 2023 +0800

    fix go server security issue
---
 eventmesh-server-go/examples/webhook/main.go | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/eventmesh-server-go/examples/webhook/main.go b/eventmesh-server-go/examples/webhook/main.go
index 66318d3e9..97f67840a 100644
--- a/eventmesh-server-go/examples/webhook/main.go
+++ b/eventmesh-server-go/examples/webhook/main.go
@@ -62,10 +62,8 @@ func main() {
 			c.JSON(http.StatusOK, Err(err, "-1"))
 			return
 		}
-		sps := strings.Split(content, "&")
-		for _, sp := range sps {
-			fmt.Println(sp)
-		}
+
+		fmt.Printf("query content: %s \n", contentEscape(content))
 		c.JSON(http.StatusOK, OK("OK"))
 	}
 	router.Any("/*anypath", func(c *gin.Context) {
@@ -78,3 +76,9 @@ func main() {
 		panic(err)
 	}
 }
+
+func contentEscape(content string) string {
+	escapedContent := strings.Replace(content, "\n", "", -1)
+	escapedContent = strings.Replace(escapedContent, "\r", "", -1)
+	return escapedContent
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: commits-help@eventmesh.apache.org