<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="343621" data-post-id="343621">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Actually, this is a security issue. My initial evaluation was wrong. Because you could have hooks running resource actions with <code>authorize?: false</code>, and have been relying on the update policies to prevent those side effects. I will issue a CVE for affected AshPostgres versions when I am back at my computer in a few hours, and I will also see if there is a way to programmatically identify actions that may have been affected.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343621" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/12">Post #11</a>
	                </div>
	            </div>
              <div id="likers-container-343621" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343621"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #11"></div>
  </section>
</div>
    <div class="postbit" id="343622" data-post-id="343622">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Regardless, the latest version of ash_postgres fixes the issue.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343622" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/13">Post #12</a>
	                </div>
	            </div>
              <div id="likers-container-343622" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343622"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #12"></div>
  </section>
</div>
    <div class="postbit" id="343623" data-post-id="343623">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rapidfsub" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rapidfsub/120/32237_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rapidfsub
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Aha.. I misunderstood. I thought the “schema related question” was fixed.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343623" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/14">Post #13</a>
	                </div>
	            </div>
              <div id="likers-container-343623" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343623"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #13"></div>
  </section>
</div>
    <div class="postbit" id="343625" data-post-id="343625">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rapidfsub" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rapidfsub/120/32237_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rapidfsub
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<pre data-code-wrap="elixir"><code class="lang-elixir">  1) test ash_postgres test complex policy with nested resources (SonetLib.Ash.Policies.CommonTest)
     test/sonet_lib/ash/policies/common_test.exs:119
     ** (Ash.Error.Unknown) Unknown Error

     * %Postgrex.Error{message: nil, postgres: %{code: :undefined_table, line: "1452", message: "relation \"product\" does not exist", position: "56", file: "parse_relation.c", unknown: "ERROR", severity: "ERROR", pg_code: "42P01", routine: "parserOpenTable"}, connection_id: 73416, query: "SELECT p0.\"id\", p0.\"is_adult_only\", p0.\"store_id\" FROM \"product\" AS p0 WHERE (p0.\"id\"::uuid = $1::uuid) AND ((CASE WHEN NOT (p0.\"is_adult_only\"::boolean) THEN $2 ELSE ash_raise_error($3::jsonb) END))"}
       (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1
       (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:994: Ecto.Adapters.SQL.execute/6
       (ecto 3.12.4) lib/ecto/repo/queryable.ex:232: Ecto.Repo.Queryable.execute/4
       (ecto 3.12.4) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3
       (ash_postgres 2.4.10) lib/data_layer.ex:1365: AshPostgres.DataLayer.update_query/4
       (ash 3.4.35) lib/ash/actions/update/bulk.ex:537: Ash.Actions.Update.Bulk.do_atomic_update/5
       (ash 3.4.35) lib/ash/actions/update/bulk.ex:266: Ash.Actions.Update.Bulk.run/6
       (ash 3.4.35) lib/ash/actions/update/update.ex:158: Ash.Actions.Update.run/4
       (ash 3.4.35) lib/ash.ex:2665: Ash.update/3
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:1397: Ash.Actions.ManagedRelationships.handle_update/9
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:735: anonymous fn/10 in Ash.Actions.ManagedRelationships.manage_relationship/7
       (elixir 1.17.0) lib/enum.ex:4858: Enumerable.List.reduce/3
       (elixir 1.17.0) lib/enum.ex:2585: Enum.reduce_while/3
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:732: Ash.Actions.ManagedRelationships.manage_relationship/7
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:554: anonymous fn/4 in Ash.Actions.ManagedRelationships.manage_relationships/4
       (elixir 1.17.0) lib/enum.ex:4858: Enumerable.List.reduce/3
       (elixir 1.17.0) lib/enum.ex:2585: Enum.reduce_while/3
       (ash 3.4.35) lib/ash/actions/update/update.ex:639: Ash.Actions.Update.manage_relationships/4
       (ash 3.4.35) lib/ash/actions/update/update.ex:503: anonymous fn/5 in Ash.Actions.Update.commit/3
       (ash 3.4.35) lib/ash/changeset/changeset.ex:3848: Ash.Changeset.run_around_actions/2
     stacktrace:
       (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:1096: Ecto.Adapters.SQL.raise_sql_call_error/1
       (ecto_sql 3.12.1) lib/ecto/adapters/sql.ex:994: Ecto.Adapters.SQL.execute/6
       (ecto 3.12.4) lib/ecto/repo/queryable.ex:232: Ecto.Repo.Queryable.execute/4
       (ecto 3.12.4) lib/ecto/repo/queryable.ex:19: Ecto.Repo.Queryable.all/3
       (ash_postgres 2.4.10) lib/data_layer.ex:1365: AshPostgres.DataLayer.update_query/4
       (ash 3.4.35) lib/ash/actions/update/bulk.ex:537: Ash.Actions.Update.Bulk.do_atomic_update/5
       (ash 3.4.35) lib/ash/actions/update/bulk.ex:266: Ash.Actions.Update.Bulk.run/6
       (ash 3.4.35) lib/ash/actions/update/update.ex:158: Ash.Actions.Update.run/4
       (ash 3.4.35) lib/ash.ex:2665: Ash.update/3
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:1397: Ash.Actions.ManagedRelationships.handle_update/9
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:735: anonymous fn/10 in Ash.Actions.ManagedRelationships.manage_relationship/7
       (elixir 1.17.0) lib/enum.ex:4858: Enumerable.List.reduce/3
       (elixir 1.17.0) lib/enum.ex:2585: Enum.reduce_while/3
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:732: Ash.Actions.ManagedRelationships.manage_relationship/7
       (ash 3.4.35) lib/ash/actions/managed_relationships.ex:554: anonymous fn/4 in Ash.Actions.ManagedRelationships.manage_relationships/4
       (elixir 1.17.0) lib/enum.ex:4858: Enumerable.List.reduce/3
       (elixir 1.17.0) lib/enum.ex:2585: Enum.reduce_while/3
       (ash 3.4.35) lib/ash/actions/update/update.ex:639: Ash.Actions.Update.manage_relationships/4
       (ash 3.4.35) lib/ash/actions/update/update.ex:503: anonymous fn/5 in Ash.Actions.Update.commit/3
       (ash 3.4.35) lib/ash/changeset/changeset.ex:3848: Ash.Changeset.run_around_actions/2
</code></pre>
<p>But another weird error is raised.<br>
Not a forbidden error.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343625" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/15">Post #14</a>
	                </div>
	            </div>
              <div id="likers-container-343625" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343625"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #14"></div>
  </section>
</div>
    <div class="postbit" id="343628" data-post-id="343628">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Okay, this is a separate issue that I will address in the morning as well (luckily not another security related one). In that particular place the schema is not being added to the query.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343628" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/16">Post #15</a>
	                </div>
	            </div>
              <div id="likers-container-343628" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343628"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #15"></div>
  </section>
</div>
    <div class="postbit" id="343658" data-post-id="343658">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I was unable to reproduce this. I’m using your repository against the latest ash and ash_postgres. Can you confirm that this occurs in the repo that you provided? Did you have to change it in some way to see that behavior?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343658" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/17">Post #16</a>
	                </div>
	            </div>
              <div id="likers-container-343658" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343658"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #16"></div>
  </section>
</div>
    <div class="postbit" id="343660" data-post-id="343660">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="rapidfsub" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/rapidfsub/120/32237_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  rapidfsub
                    <span class="op-star" title="Thread Starter">
                      <img alt="OP" class="op-star-icon" src="/assets/thread-icons/thread-icon-thread-starter-df91e872.png" />
                    </span>
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<pre data-code-wrap="elixir"><code class="lang-elixir">    policy action(:purchase) do
      # access_type :strict
      forbid_unless actor_present()
      authorize_if expr(not is_adult_only or ^actor(:age) &gt;= 19)
    end
</code></pre>
<p>You need to comment out <code>access_type :strict</code> in Product policy.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343660" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/18">Post #17</a>
	                </div>
	            </div>
              <div id="likers-container-343660" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343660"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #17"></div>
  </section>
</div>
    <div class="postbit" id="343673" data-post-id="343673">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Fixed in <code>2.4.11</code> of <code>ash_postgres</code>.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343673" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/19">Post #18</a>
	                </div>
	            </div>
              <div id="likers-container-343673" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343673"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #18"></div>
  </section>
</div>
    <div class="postbit" id="343695" data-post-id="343695">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="zachdaniel" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/zachdaniel/120/31980_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  zachdaniel
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Creator of Ash</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>CVE has been created here: <a href="https://github.com/ash-project/ash_postgres/security/advisories/GHSA-hf59-7rwq-785m" class="inline-onebox" rel="noopener nofollow ugc">Empty, atomic, non-bulk actions, policy bypass for side-effects vulnerability. · Advisory · ash-project/ash_postgres · GitHub</a></p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="343695" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/empty-update-action-with-policies/66954/20">Post #19</a>
	                </div>
	            </div>
              <div id="likers-container-343695" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="343695"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>