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

Codeql security fixes #2169

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,6 @@ func InitIBMCloudProperties(properties map[string]string) error {
IBMCloudProps.IsSelfManaged = true
}

log.Debugf("%+v", IBMCloudProps)

if len(IBMCloudProps.ResourceGroupID) <= 0 {
log.Info("[warning] RESOURCE_GROUP_ID was not set.")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ func (lio *IBMCloudInstallOverlay) Delete(ctx context.Context, cfg *envconf.Conf

// Update install/overlays/ibmcloud/kustomization.yaml
func (lio *IBMCloudInstallOverlay) Edit(ctx context.Context, cfg *envconf.Config, properties map[string]string) error {
log.Debugf("%+v", properties)
var err error

// image
Expand Down
3 changes: 2 additions & 1 deletion src/cloud-api-adaptor/test/securecomms/test/kbs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package test
import (
"context"
"fmt"
"html"
"io"
"log"
"net"
Expand All @@ -29,7 +30,7 @@ func (p kbsport) getRoot(w http.ResponseWriter, r *http.Request) {
http.Error(w, "Not Found", http.StatusNotFound)
return
}
_, err := w.Write(keyMaterial)
_, err := w.Write([]byte(html.EscapeString(string(keyMaterial))))
if err != nil {
http.Error(w, "cant write response", http.StatusInternalServerError)
return
Expand Down
2 changes: 1 addition & 1 deletion src/cloud-providers/libvirt/libvirt.go
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ func CreateDomain(ctx context.Context, libvirtClient *libvirtClient, v *vmConfig
func DeleteDomain(ctx context.Context, libvirtClient *libvirtClient, id string) (err error) {

logger.Printf("Deleting instance (%s)", id)
idUint, _ := strconv.ParseUint(id, 10, 64)
idUint, _ := strconv.ParseUint(id, 10, 32)
// libvirt API takes uint32
exists, err := checkDomainExistsById(uint32(idUint), libvirtClient)
if err != nil {
Expand Down
Loading