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

webhook test issue #1

Open
zpavlinovic opened this issue Jan 3, 2025 · 12 comments
Open

webhook test issue #1

zpavlinovic opened this issue Jan 3, 2025 · 12 comments

Comments

@zpavlinovic
Copy link
Owner

This issue is for testing purposes. In particular, for testing GitHub webhooks.

@zpavlinovic
Copy link
Owner Author

First comment.

@zpavlinovic
Copy link
Owner Author

Not a bisection comment.

@zpavlinovic
Copy link
Owner Author

zpavlinovic commented Jan 3, 2025

/bisect

package main

import (
       "encoding/xml"
       "strings"
       "testing"
)

func Test(t *testing.T) {
       dec := xml.NewDecoder(strings.NewReader(`<item b=']]>'/>`))
       if _, err := dec.RawToken(); err == nil {
               t.Fatalf("Expected ERROR")
       }
}
// comment

@zpavlinovic
Copy link
Owner Author

/bisect

package main

import (
       "encoding/xml"
       "strings"
       "testing"
)

func Test(t *testing.T) {
       dec := xml.NewDecoder(strings.NewReader(`<item b=']]>'/>`))
       if _, err := dec.RawToken(); err == nil {
               t.Fatalf("Expected ERROR")
       }
}

1 similar comment
@zpavlinovic
Copy link
Owner Author

/bisect

package main

import (
       "encoding/xml"
       "strings"
       "testing"
)

func Test(t *testing.T) {
       dec := xml.NewDecoder(strings.NewReader(`<item b=']]>'/>`))
       if _, err := dec.RawToken(); err == nil {
               t.Fatalf("Expected ERROR")
       }
}

@zpavlinovic
Copy link
Owner Author

/bisect

package main                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
import (                                                                                                                                                                                                                                                                                  
        "crypto/ecdsa"                                                                                                                                                                                                                                                                    
        "crypto/elliptic"                                                                                                                                                                                                                                                                 
        "crypto/rand"                                                                                                                                                                                                                                                                     
        "crypto/sha256"                                                                                                                                                                                                                                                                   
        "fmt"                                                                                                                                                                                                                                                                             
        "math/big"                                                                                                                                                                                                                                                                        
        "testing"                                                                                                                                                                                                                                                                         
)                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                          
func TestSomething(t *testing.T) {                                                                                                                                                                                                                                                        
        priv, ok := new(big.Int).SetString("123", 10)                                                                                                                                                                                                                                     
        if ok == false {                                                                                                                                                                                                                                                                  
                panic("Cannot decode bignum")                                                                                                                                                                                                                                             
        }                                                                                                                                                                                                                                                                                 
        var priv_ecdsa ecdsa.PrivateKey                                                                                                                                                                                                                                                   
        priv_ecdsa.D = priv                                                                                                                                                                                                                                                               
        priv_ecdsa.PublicKey.Curve = elliptic.P256()                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                          
        msg := "hello, world"                                                                                                                                                                                                                                                             
        hash := sha256.Sum256([]byte(msg))                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
        r, s, err := ecdsa.Sign(rand.Reader, &priv_ecdsa, hash[:])                                                                                                                                                                                                                        
        fmt.Println(err)                                                                                                                                                                                                                                                                  
        fmt.Println(r.String())                                                                                                                                                                                                                                                           
        fmt.Println(s.String())                                                                                                                                                                                                                                                           
}

@zpavlinovic
Copy link
Owner Author

@gabyhelp bisect

package main                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
import (                                                                                                                                                                                                                                                                                  
        "crypto/ecdsa"                                                                                                                                                                                                                                                                    
        "crypto/elliptic"                                                                                                                                                                                                                                                                 
        "crypto/rand"                                                                                                                                                                                                                                                                     
        "crypto/sha256"                                                                                                                                                                                                                                                                   
        "fmt"                                                                                                                                                                                                                                                                             
        "math/big"                                                                                                                                                                                                                                                                        
        "testing"                                                                                                                                                                                                                                                                         
)                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                          
func TestSomething(t *testing.T) {                                                                                                                                                                                                                                                        
        priv, ok := new(big.Int).SetString("123", 10)                                                                                                                                                                                                                                     
        if ok == false {                                                                                                                                                                                                                                                                  
                panic("Cannot decode bignum")                                                                                                                                                                                                                                             
        }                                                                                                                                                                                                                                                                                 
        var priv_ecdsa ecdsa.PrivateKey                                                                                                                                                                                                                                                   
        priv_ecdsa.D = priv                                                                                                                                                                                                                                                               
        priv_ecdsa.PublicKey.Curve = elliptic.P256()                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                          
        msg := "hello, world"                                                                                                                                                                                                                                                             
        hash := sha256.Sum256([]byte(msg))                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
        r, s, err := ecdsa.Sign(rand.Reader, &priv_ecdsa, hash[:])                                                                                                                                                                                                                        
        fmt.Println(err)                                                                                                                                                                                                                                                                  
        fmt.Println(r.String())                                                                                                                                                                                                                                                           
        fmt.Println(s.String())                                                                                                                                                                                                                                                           
}

@zpavlinovic
Copy link
Owner Author

Bogus comment.

@zpavlinovic
Copy link
Owner Author

Another bogus comment.

@zpavlinovic
Copy link
Owner Author

@gabyhelp bisect

package main                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
import (                                                                                                                                                                                                                                                                                  
        "crypto/ecdsa"                                                                                                                                                                                                                                                                    
        "crypto/elliptic"                                                                                                                                                                                                                                                                 
        "crypto/rand"                                                                                                                                                                                                                                                                     
        "crypto/sha256"                                                                                                                                                                                                                                                                   
        "fmt"                                                                                                                                                                                                                                                                             
        "math/big"                                                                                                                                                                                                                                                                        
        "testing"                                                                                                                                                                                                                                                                         
)                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                          
func TestSomething(t *testing.T) {                                                                                                                                                                                                                                                        
        priv, ok := new(big.Int).SetString("123", 10)                                                                                                                                                                                                                                     
        if ok == false {                                                                                                                                                                                                                                                                  
                panic("Cannot decode bignum")                                                                                                                                                                                                                                             
        }                                                                                                                                                                                                                                                                                 
        var priv_ecdsa ecdsa.PrivateKey                                                                                                                                                                                                                                                   
        priv_ecdsa.D = priv                                                                                                                                                                                                                                                               
        priv_ecdsa.PublicKey.Curve = elliptic.P256()                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                          
        msg := "hello, world"                                                                                                                                                                                                                                                             
        hash := sha256.Sum256([]byte(msg))                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
        r, s, err := ecdsa.Sign(rand.Reader, &priv_ecdsa, hash[:])                                                                                                                                                                                                                        
        fmt.Println(err)                                                                                                                                                                                                                                                                  
        fmt.Println(r.String())                                                                                                                                                                                                                                                           
        fmt.Println(s.String())                                                                                                                                                                                                                                                           
}

@zpavlinovic
Copy link
Owner Author

@gabyhelp bisect

package main                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
import (                                                                                                                                                                                                                                                                                  
        "crypto/ecdsa"                                                                                                                                                                                                                                                                    
        "crypto/elliptic"                                                                                                                                                                                                                                                                 
        "crypto/rand"                                                                                                                                                                                                                                                                     
        "crypto/sha256"                                                                                                                                                                                                                                                                   
        "fmt"                                                                                                                                                                                                                                                                             
        "math/big"                                                                                                                                                                                                                                                                        
        "testing"                                                                                                                                                                                                                                                                         
)                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                          
func TestSomething(t *testing.T) {                                                                                                                                                                                                                                                        
        priv, ok := new(big.Int).SetString("123", 10)                                                                                                                                                                                                                                     
        if ok == false {                                                                                                                                                                                                                                                                  
                panic("Cannot decode bignum")                                                                                                                                                                                                                                             
        }                                                                                                                                                                                                                                                                                 
        var priv_ecdsa ecdsa.PrivateKey                                                                                                                                                                                                                                                   
        priv_ecdsa.D = priv                                                                                                                                                                                                                                                               
        priv_ecdsa.PublicKey.Curve = elliptic.P256()                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                          
        msg := "hello, world"                                                                                                                                                                                                                                                             
        hash := sha256.Sum256([]byte(msg))                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
        r, s, err := ecdsa.Sign(rand.Reader, &priv_ecdsa, hash[:])                                                                                                                                                                                                                        
        fmt.Println(err)                                                                                                                                                                                                                                                                  
        fmt.Println(r.String())                                                                                                                                                                                                                                                           
        fmt.Println(s.String())                                                                                                                                                                                                                                                           
}

1 similar comment
@mknyszek
Copy link

mknyszek commented Jan 9, 2025

@gabyhelp bisect

package main                                                                                                                                                                                                                                                                              
                                                                                                                                                                                                                                                                                          
import (                                                                                                                                                                                                                                                                                  
        "crypto/ecdsa"                                                                                                                                                                                                                                                                    
        "crypto/elliptic"                                                                                                                                                                                                                                                                 
        "crypto/rand"                                                                                                                                                                                                                                                                     
        "crypto/sha256"                                                                                                                                                                                                                                                                   
        "fmt"                                                                                                                                                                                                                                                                             
        "math/big"                                                                                                                                                                                                                                                                        
        "testing"                                                                                                                                                                                                                                                                         
)                                                                                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                                                          
func TestSomething(t *testing.T) {                                                                                                                                                                                                                                                        
        priv, ok := new(big.Int).SetString("123", 10)                                                                                                                                                                                                                                     
        if ok == false {                                                                                                                                                                                                                                                                  
                panic("Cannot decode bignum")                                                                                                                                                                                                                                             
        }                                                                                                                                                                                                                                                                                 
        var priv_ecdsa ecdsa.PrivateKey                                                                                                                                                                                                                                                   
        priv_ecdsa.D = priv                                                                                                                                                                                                                                                               
        priv_ecdsa.PublicKey.Curve = elliptic.P256()                                                                                                                                                                                                                                      
                                                                                                                                                                                                                                                                                          
        msg := "hello, world"                                                                                                                                                                                                                                                             
        hash := sha256.Sum256([]byte(msg))                                                                                                                                                                                                                                                
                                                                                                                                                                                                                                                                                          
        r, s, err := ecdsa.Sign(rand.Reader, &priv_ecdsa, hash[:])                                                                                                                                                                                                                        
        fmt.Println(err)                                                                                                                                                                                                                                                                  
        fmt.Println(r.String())                                                                                                                                                                                                                                                           
        fmt.Println(s.String())                                                                                                                                                                                                                                                           
}

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

No branches or pull requests

2 participants