File tree Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Expand file tree Collapse file tree 2 files changed +1
-13
lines changed Original file line number Diff line number Diff line change 1+ Remove unused `compare_digest` function.
Original file line number Diff line number Diff line change 1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15- import hmac
1615import logging
1716import random
1817from typing import List , Union
6059
6160from ._base import client_patterns , interactive_auth_handler
6261
63- # We ought to be using hmac.compare_digest() but on older pythons it doesn't
64- # exist. It's a _really minor_ security flaw to use plain string comparison
65- # because the timing attack is so obscured by all the other code here it's
66- # unlikely to make much difference
67- if hasattr (hmac , "compare_digest" ):
68- compare_digest = hmac .compare_digest
69- else :
70-
71- def compare_digest (a , b ):
72- return a == b
73-
74-
7562logger = logging .getLogger (__name__ )
7663
7764
You can’t perform that action at this time.
0 commit comments