From 55e6fd7c69ff96837b2588292e83bcfa10b8378d Mon Sep 17 00:00:00 2001 From: "ORLHAC Etienne [EXT]" Date: Fri, 25 Oct 2019 11:40:38 +0200 Subject: [PATCH 1/8] Change message --- src/ldap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ldap.rs b/src/ldap.rs index b93d878b..0285c6e5 100644 --- a/src/ldap.rs +++ b/src/ldap.rs @@ -18,8 +18,8 @@ pub fn launch_ldap_connector() { loop { if CONFIG._enable_ldap() { match sync_from_ldap(&conn) { + Ok(_) => println!("Sucessfully synced LDAP users"), Err(_) => println!("Couldn't sync from LDAP, check LDAP config"), - _ => {} } } sleep(interval); From 792ac15145bcf26658aad3c29bd37303517cd8c0 Mon Sep 17 00:00:00 2001 From: "ORLHAC Etienne [EXT]" Date: Fri, 25 Oct 2019 11:42:00 +0200 Subject: [PATCH 2/8] Print specific error --- src/ldap.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ldap.rs b/src/ldap.rs index 0285c6e5..4c647b18 100644 --- a/src/ldap.rs +++ b/src/ldap.rs @@ -19,7 +19,7 @@ pub fn launch_ldap_connector() { if CONFIG._enable_ldap() { match sync_from_ldap(&conn) { Ok(_) => println!("Sucessfully synced LDAP users"), - Err(_) => println!("Couldn't sync from LDAP, check LDAP config"), + Err(error) => println!("Couldn't sync from LDAP, check LDAP config : {:?}", error), } } sleep(interval); From 13b7d9dff5e210f47d76e3d73052cdd5c048a3da Mon Sep 17 00:00:00 2001 From: "ORLHAC Etienne [EXT]" Date: Fri, 25 Oct 2019 12:44:51 +0200 Subject: [PATCH 3/8] Fix allow referral ldap result --- src/api/identity.rs | 2 +- src/ldap.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/identity.rs b/src/api/identity.rs index 2512619d..844c0ca0 100644 --- a/src/api/identity.rs +++ b/src/api/identity.rs @@ -96,7 +96,7 @@ fn _password_login(data: ConnectData, conn: DbConn, ip: ClientIp) -> JsonResult // Attempt to bind to ldap with these credentials match LdapConn::new(CONFIG.ldap_host().as_str()) { Ok(ldap) => { - let bind = ldap.simple_bind(ldap_username, password)?.success(); + let bind = ldap.simple_bind(ldap_username, password)?.non_error(); if bind.is_err() { err!( diff --git a/src/ldap.rs b/src/ldap.rs index 4c647b18..c72a0d6b 100644 --- a/src/ldap.rs +++ b/src/ldap.rs @@ -18,7 +18,7 @@ pub fn launch_ldap_connector() { loop { if CONFIG._enable_ldap() { match sync_from_ldap(&conn) { - Ok(_) => println!("Sucessfully synced LDAP users"), + Ok(_) => println!("Successfully synced LDAP users"), Err(error) => println!("Couldn't sync from LDAP, check LDAP config : {:?}", error), } } From 7b3d973778cc7b2eeb360082a21ab1f9f8597aff Mon Sep 17 00:00:00 2001 From: liberodark Date: Fri, 25 Oct 2019 23:16:39 +0200 Subject: [PATCH 4/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 02c4ec7d..906cfbdf 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,7 @@ Basically full implementation of Bitwarden API is provided including: * Website icons API * Authenticator and U2F support * YubiKey OTP + * LDAP support ## Installation Pull the docker image and mount a volume from the host for persistent storage: From 154f525e529f218171b1641391944a3d7aa645e8 Mon Sep 17 00:00:00 2001 From: codefactor-io Date: Tue, 29 Oct 2019 18:13:16 +0000 Subject: [PATCH 5/8] [CodeFactor] Apply fixes --- src/static/scripts/bootstrap-native-v4.js | 14 +++++++------- src/static/scripts/md5.js | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/static/scripts/bootstrap-native-v4.js b/src/static/scripts/bootstrap-native-v4.js index e0cdf3a5..d31ef20e 100644 --- a/src/static/scripts/bootstrap-native-v4.js +++ b/src/static/scripts/bootstrap-native-v4.js @@ -1282,7 +1282,7 @@ if ( !!element && !(stringModal in element) ) { on(element, clickEvent, clickHandler); } - if ( !!self[content] ) { self.setContent( self[content] ); } + if ( self[content] ) { self.setContent( self[content] ); } if (element) { element[stringModal] = self; modal[modalTrigger] = element; } else { modal[stringModal] = self; } }; @@ -1372,7 +1372,7 @@ titleString = options.title || element[getAttribute](dataTitle); contentString = options.content || element[getAttribute](dataContent); // fixing https://github.com/thednp/bootstrap.native/issues/233 - contentString = !!contentString ? contentString.trim() : null; + contentString = contentString ? contentString.trim() : null; popover = DOC[createElement](div); @@ -1452,7 +1452,7 @@ updatePopover(); showPopover(); bootstrapCustomEvent.call(element, showEvent, component); - !!self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); + self[animation] ? emulateTransitionEnd(popover, showTrigger) : showTrigger(); } }, 20 ); }; @@ -1462,7 +1462,7 @@ if (popover && popover !== null && hasClass(popover,showClass)) { bootstrapCustomEvent.call(element, hideEvent, component); removeClass(popover,showClass); - !!self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); + self[animation] ? emulateTransitionEnd(popover, hideTrigger) : hideTrigger(); } }, self[delay] ); }; @@ -1516,7 +1516,7 @@ for (var i=0, il=links[length]; i Date: Tue, 29 Oct 2019 19:16:52 +0100 Subject: [PATCH 6/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 906cfbdf..555b8cff 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Travis Build Status](https://travis-ci.org/dani-garcia/bitwarden_rs.svg?branch=master)](https://travis-ci.org/dani-garcia/bitwarden_rs) [![Docker Pulls](https://img.shields.io/docker/pulls/bitwardenrs/server.svg)](https://hub.docker.com/r/bitwardenrs/server) [![Dependency Status](https://deps.rs/repo/github/dani-garcia/bitwarden_rs/status.svg)](https://deps.rs/repo/github/dani-garcia/bitwarden_rs) +[![Code Status](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs/badge)](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs) [![GitHub Release](https://img.shields.io/github/release/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/releases/latest) [![GPL-3.0 Licensed](https://img.shields.io/github/license/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/blob/master/LICENSE.txt) [![Matrix Chat](https://img.shields.io/matrix/bitwarden_rs:matrix.org.svg?logo=matrix)](https://matrix.to/#/#bitwarden_rs:matrix.org) From 7672711377a7bbd1c9a2817212278e768685588d Mon Sep 17 00:00:00 2001 From: liberodark Date: Tue, 29 Oct 2019 19:23:57 +0100 Subject: [PATCH 7/8] update --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index 555b8cff..906cfbdf 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,6 @@ [![Travis Build Status](https://travis-ci.org/dani-garcia/bitwarden_rs.svg?branch=master)](https://travis-ci.org/dani-garcia/bitwarden_rs) [![Docker Pulls](https://img.shields.io/docker/pulls/bitwardenrs/server.svg)](https://hub.docker.com/r/bitwardenrs/server) [![Dependency Status](https://deps.rs/repo/github/dani-garcia/bitwarden_rs/status.svg)](https://deps.rs/repo/github/dani-garcia/bitwarden_rs) -[![Code Status](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs/badge)](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs) [![GitHub Release](https://img.shields.io/github/release/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/releases/latest) [![GPL-3.0 Licensed](https://img.shields.io/github/license/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/blob/master/LICENSE.txt) [![Matrix Chat](https://img.shields.io/matrix/bitwarden_rs:matrix.org.svg?logo=matrix)](https://matrix.to/#/#bitwarden_rs:matrix.org) From 95f904d9decdad35622a954f877a1081dce1ab22 Mon Sep 17 00:00:00 2001 From: liberodark Date: Tue, 29 Oct 2019 19:25:25 +0100 Subject: [PATCH 8/8] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 906cfbdf..555b8cff 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ [![Travis Build Status](https://travis-ci.org/dani-garcia/bitwarden_rs.svg?branch=master)](https://travis-ci.org/dani-garcia/bitwarden_rs) [![Docker Pulls](https://img.shields.io/docker/pulls/bitwardenrs/server.svg)](https://hub.docker.com/r/bitwardenrs/server) [![Dependency Status](https://deps.rs/repo/github/dani-garcia/bitwarden_rs/status.svg)](https://deps.rs/repo/github/dani-garcia/bitwarden_rs) +[![Code Status](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs/badge)](https://www.codefactor.io/repository/github/liberodark/bitwarden_rs) [![GitHub Release](https://img.shields.io/github/release/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/releases/latest) [![GPL-3.0 Licensed](https://img.shields.io/github/license/dani-garcia/bitwarden_rs.svg)](https://github.com/dani-garcia/bitwarden_rs/blob/master/LICENSE.txt) [![Matrix Chat](https://img.shields.io/matrix/bitwarden_rs:matrix.org.svg?logo=matrix)](https://matrix.to/#/#bitwarden_rs:matrix.org)