# HG changeset patch
# User jfp <jf.pieronne@laposte.net>
# Date 1675168753 -3600
#      Tue Jan 31 13:39:13 2023 +0100
# Node ID 016fb3302660c90b15031c9a9befabef7a0dd9d3
# Parent  b1f81770885a75d1b103a6a81d9a7a5d50a190ea
Fix rule1303

diff --git a/secrules/rules13.py b/secrules/rules13.py
--- a/secrules/rules13.py
+++ b/secrules/rules13.py
@@ -84,16 +84,8 @@
                         prot: int = retsec[2][
                             ossdef.OSS__PROTECTION
                         ]   # type: ignore
-                        if (
-                            (prot & 0x8000)
-                            or (prot & 0x4000)
-                            or (prot & 0x2000)
-                            or (prot & 0x1000)
-                            or (prot & 0x800)
-                            or (prot & 0x400)
-                            or (prot & 0x200)
-                            or (prot & 0x100)
-                        ):
+                        gprot = (prot & 0x0F00) >> 8
+                        if gprot != 0xF:
                             if fmt:
                                 print('1303"2"', f.decode(), file=fo)
                             else: