Allow user to specify weights_only=True to tighten security
#10666
+78
−5
weights_only=True to tighten security
#10666