Then when he says, Let him who boasts, boast of the Lord, he shows that he is not going beyond the measure as to that in which he glories, saying: if I glory in him in whom one should glory, I am not going beyond. But since one should glory in God, Let him who boasts, boast of the Lord: "Let him who glories glory in this, that he understands and knows me" (Jer. 9:24). This can be explained in three ways: in one way, Let him who boasts, boast of the Lord, so that in the Lord denotes the object in which he glories. As if to say: let him glory in the fact that he possesses the Lord by knowing and... loving. In another way, Let him who boasts, boast of the Lord, i.e., according to God; and one glories in this way when he glories in the things of God and not in evil, as the one who is asked in Ps. (52:1, Vulgate): "Why do you glory in malice?" In the third way, Let him who boasts, boast of the Lord, i.e., let him regard himself as having his glory from God, referring to God everything that redounds to his own glory: "What have you that you did not receive? If then you received it, why do you boast as if it were not a gift?" (1 Cor. 4:7). This is the way it is taken here when he says: Let him who boasts, boast of the Lord. As if to say: I glory in the foregoing, but not as though I had this from myself and not from God. And this is also your measure, because all your good has sprung from us. And indeed we should glory in the Lord, not imputing our glory to ourselves, but to God.
Source: Commentary on 2 Corinthians