diff --git a/api/validation.go b/api/validation.go index d273c8ace..4aab3b48e 100644 --- a/api/validation.go +++ b/api/validation.go @@ -27,6 +27,7 @@ func checkParameters(c ControllerInterface) { for _, p := range requiredParameters { if c.GetString(p) == "" { + beego.Warn("Missing required parameter:", p) abortRequest(c, responses.ERROR_MISSING_PARAMETER) } } @@ -42,6 +43,7 @@ func authenticate(c ControllerInterface) { } } if user != beego.AppConfig.String("user") || pass != beego.AppConfig.String("password") { + beego.Warn("Invalid login:", user) abortRequest(c, responses.ERROR_AUTHENTICATION_FAIL) } } diff --git a/api/validation_test.go b/api/validation_test.go index 3bb3e3612..0bc204af5 100644 --- a/api/validation_test.go +++ b/api/validation_test.go @@ -58,7 +58,6 @@ func TestAuthentication(t *testing.T) { _, w := Get("/rest/ping.view?u=deluan&p=enc:776f726470617373&c=test&v=1.0.0", "TestAuthentication") Convey("The status should be 'ok'", func() { v := responses.Subsonic{} - println("------", w.Body.String()) xml.Unmarshal(w.Body.Bytes(), &v) So(v.Status, ShouldEqual, "ok") })