Escape LDAP user filter (#501)
Special characters within the username inserted into an LDAP search request are not escaped. This could allow the logic of the LDAP query used to get a user to be manipulated.
This change escapes any special characters within the username being looked up within LDAP.
Signed-off-by: Mark S. Lewis Mark.S.Lewis@outlook.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号
Fabric CA Developer’s Guide
This is the Developer’s Guide for Fabric CA, which is a Certificate Authority for Hyperledger Fabric.
Fabric CA can issue enrollment certificates and TLS certificates for Hyperledger Fabric deployments.
See the Fabric Getting Started Guide for information on how to install and use Fabric CA with Hyperledger Fabric sample networks.
See the Fabric CA User’s Guide, Operations Guide, and Deployment Guide for detailed information on how to use and deploy Fabric CA.
The remainder of this guide is intended for developers contributing to Fabric CA.
Prerequisites
Contribution guidelines
You are welcome to contribute to Fabric CA!
The following are guidelines to follow when contributing:
See the general information about contributing to fabric.
To run the unit tests manually:
The test coverage for each package must be 75% or greater. If this fails due to insufficient test coverage, then you can run
gencovto get a coverage report to see what code is not being tested. Once you have added additional test cases, you can rungo test -coverin the appropriate package to see the current coverage level.WARNING: Running the unit-tests may fail due to too many open file descriptors. Depending on where the failure occurs, the error message may not be obvious and may only say something similar to “unable to open database file”. Depending on the settings on your host, you may need to increase the maximum number of open file descriptors. For example, the OSX default per-process maximum number of open file descriptors is 256. You may issue the following command to display your current setting:
And the following command will increase this setting to 65536:
Please note that this change is only temporary. To make it permanent, you will need to consult the documentation for your host operating system.
Package overview
Additional info
FVT
See FVT tests for information on functional verification test cases.
Updating the cfssl vendored package
Following are the steps to update cfssl package using version 1.0.8 of govendor tool.
Remove cfssl from vendor folder
Clone cfssl repo
Add cfssl from $GOPATH to the vendor folder
Remove sqlx package from cfssl vendor folder. This is because certsql.NewAccessor (called by fabric-ca) requires sqlx.db object to be passed from the same package. If we were to have sqlx package both in fabric-ca and cfssl vendor folder, go compiler will throw an error
Remove the packages that are added to the fabric-ca vendor folder that are not needed by fabric-ca
License
Hyperledger Project source code files are made available under the Apache License, Version 2.0 (Apache-2.0), located in the LICENSE file. Hyperledger Project documentation files are made available under the Creative Commons Attribution 4.0 International License (CC-BY-4.0), available at http://creativecommons.org/licenses/by/4.0/.