Is the absolution given by priests who are heretics valid?

I have two questions Father:
  1. Is the absolution given by priests who are heretics or possible heretics valid?
  2. Since I received Holy Communion during Mass, not knowing for sure the answer to the first question, did I commit Eucharistic desecration and/or sacrilege?
Thank you Father, and always have the courage to fight for God and thank you too for your blog.
Ad primum.   The absolution given by heretical priests is more than likely valid, just as is the consecration during Mass by heretics.  Provided that they say, do and intend what the Church intends by those acts, without a real act of will within themselves to deny what the Church intends – that is, saying to themselves “I intend to pretend to doing this”, then the absolution is valid.  The old phrase is that “the minister must have the intention at least of doing what the Church does”.  It could be that the minister has some faulty notions about the Church, but if he intends to make his own the Church’s own intention, the sacrament is validly administered.  Hence, in the case of emergency baptism, even an atheist can validly baptize, so long as she, when she pours the water and says the proper words, has the intention of doing for that person what the Church intends, whether she believes in what the Church teaches or not.
Remember that validity of sacraments depends not on the holiness of the priest, or his knowledge, or the accuracy of his notions.  Christ is the true administrator of the Sacrament of Penance and absolution through His agent the priest, alter Christus by reason of Holy Orders.
So, if Father Heretic gets into a confessional and hears confessions and gives absolution, he more than likely has at least an internal intention to administer a sacrament.  The absolution is, therefore, valid (provided he uses at least the minimal form).
Ad secundum You more than likely did not commit a sacrilege by going to Communion.  Even if you had a measure of doubt about the validity of the absolution at the time, you were not at the time of Communion sure that you were in the state of mortal sin.   You might have had a doubt or two, but you were not convinced that you were in the state of mortal sin.
If a person is sure that she is in the state of mortal sin, she cannot, must not, may not go to Holy Communion.  She is obliged not to receive, because she knows that she is in the state of sin and that Communion would be a sacrilege, compounding sin with sin.
Of course nobody is obliged to receive Communion at this or that Mass!  If a person has doubts about her state, really doesn’t know, it is also perfectly acceptable not to receive.  As a matter of fact, if receiving would increase anxiety rather than bring comfort and peace, then by all means stay in the pew and pray.
The point is this.  If you know that you are not in the state of grace, don’t receive Communion.  That would be quite wicked and a real mistake.  If you are not sure, you think you are in the state of grace, but you are not quite sure, you can still go to Communion, even though it is perfectly okay not to go.
******
We know that venial sins can be forgiven without confession, through various other pious works.
We know that baptism forgives all sins, including mortal sins, committed up to that point. And that the Sacrament of the Sick forgives venial sins (and, as I recall, mortal sins if the patient is not able to confess, and would have confessed if he were able).
We also know that the ordinary way mortal sins are forgiven is through the reception of absolution in a confession in which the penitent orally confesses all his mortal sins, in number and kind, to a priest who has faculties to hear the confession.
We also know that under certain extreme circumstances (e.g., a sinking ship or an airplane about to crash) a priest can validly absolve even mortal sins with a general absolution (abuses of this practice notwithstanding).
We also know that a priest must have faculties to absolve to be able to do so validly. These faculties can be extended or denied to persons, geographical territories, or even to particular sins (e.g., abortion).
We also know that any priest, even a laicized or apostate priest, can validly absolve a penitent in danger of death.

http://wdtprs.com/blog/2018/11/ask-father-absolution-from-a-heretical-priest-and-then-going-to-communion/