  The first device-independent quantum private query protocol (MRT17) which is
proposed by Maitra \emph{et al.} [Phys. Rev. A 95, 042344 (2017)] to enhance
the security through the certification of the states and measurements. However,
the MRT17 protocol works under an assumption of perfect detectors, which
increases difficulty in the implementations. Therefore, it is crucial to
investigate what would affect the security of this protocol if the detectors
were imperfect. Meanwhile, Maitra \emph{et al.} also pointed out that this
problem remains open. In this paper, we analyze the security of MRT17 protocol
when the detectors are imperfect and then find that this protocol is under
attack in the aforementioned case. Furthermore, we propose device-independent
QPQ protocol without the assumption of perfect detectors. Compared with MRT17
protocol, our protocol is more practical without relaxing the security in the
device-independent framework.
