问题标签 [application.cfm]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
coldfusion - Application.cfm 301 重定向后缺少会话变量
运行 ColdFusion 7。
session
Application.cfm 将所有变量循环到request.session
OnRequestEnd.cfm 将所有request.session
值循环回session
它这样做是为了在单个事务中写入变量时只需要锁定一次范围。(我相信这不再是一个问题了?但我不能完全撕掉它)。
我有一个“redirect.cfm”页面,它提供 301 重定向到 SEO URL 或提供内容。某些表单发布到旧 URL,因此需要 301 重定向,这会导致 POST 数据丢失。这就是我打算如何处理它。
然后它继续进行 301 重定向,当它返回到 redirect.cfm 以传递内容时,它运行此代码
如果数据发布不需要 301 重定向,这可以正常工作。
通过 301 重定向,我确认 Application.cfm、OnRequestEnd.cfm 都运行了两次(一次用于初始 301,一次用于内容交付)。
在第一次 OnRequestEnd.cfm 调用结束时,session.postdata
表单数据已正确填充。
在 301 重定向之后,它再次点击 Application.cfm,session.postdata
返回“struct [empty]”
有什么帮助吗?谢谢
session - 使用会话而不在 Application.cfm 中声明会话
我需要在coldfusion中使用会话而不在application.cfm中声明会话。
coldfusion - Coldfusion 使用 onRequestEnd() 和 Application.cfm 文件
我正在使用基于Application.cfm
文件而不是Application.cfc
文件的遗留应用程序工作。
处理请求后需要能够运行代码。(基本上,我想使用<cfhtmlhead>
标签将一些 Javascript 和 CSS 文件注入到每个加载的文档中。在我使用 GreaseMonkey 用户脚本执行此操作之前,但最好是服务器端的。)
从我读到的内容来看,我认为我应该能够使用该onRequestEnd()
功能来做到这一点,但是,我只见过关于Application.cfc
文件的引用。我读过您可以将onRequestEnd.cfm
文件与文件放在同一目录中Application.cfm
以将其注册到onRequestEnd()
函数中,但系统不会映射到一个Application.cfm
文件(即我必须将此onRequestEnd.cfm
文件放在很多目录中)。
还有其他方法可以onRequestEnd()
使用Application.cfm
设置注册此功能吗?以防万一,我们正在运行 Coldfusion 9。
iis - Bluedragon 7.1 Application.cfm 被所有页面调用,而不仅仅是 cfm 页面
我们当前所有的网络服务器都具有以下配置: IIS 6.0 Windows Server 2003 Bluedragon 6.22
我们最近被告知要升级到 windows server 2008。为此,我们必须升级到 Bluedragon 7.1 和 IIS 7.0
我们遇到的问题是我们的网络应用程序中的所有页面/文件都调用了 application.cfm 文件,而不仅仅是 CFM 页面。因此,HTML/CFM 标签被注入到 .js 和其他类型的文件中,导致它们无法运行。
有谁知道如何配置这个?Application.cfm 应该只为 CFM 页面调用
coldfusion - 如何在 Application.cfm 文件范围内重新初始化网站
也许标题看起来有点奇怪,但我的问题是直截了当的,如何使用 Application.cfm 重新初始化应用程序,我知道我们在 Application.cfc 中是如何做的
但是如何在Application.cfm中,不确定,请指导
谢谢
coldfusion - ColdFusion9会话变量随机清除
我有一个应用程序在会话中不断给我变量未定义。这是随机发生的。我可以单击一个页面并得到错误,注销然后重新登录并单击同一页面并没有得到错误,再单击三个页面即可,然后单击另一个页面并再次得到错误。我没有找到任何押韵或理由。在我的 application.cfm 我有:
在查看代理调试器时,我可以看到在出错之前在页面上声明的所有会话变量。在下一页(当它出错时)我看到的唯一会话变量是:
cfid、cftoken、sessionid、urltoken
有没有其他人经历过这个?我在 Windows Server 2008 R2 上运行 Coldfusion 版本 9.0.2.282541。如果您需要更多详细信息,请告诉我。
coldfusion - Can't refresh CFC CF9 when using an application.cfm
I was charged with making some modification to an old application, and I created a new page which was being passed a URL parameter page_name
, which is a you guessed it a name of a page with .cfm
appended. So, in my haste, I continued using it, and was building out my CFC and using the page_name
as the identifier for a record. Then I realized that there is a possibility of that name being duplicated in the table, and changed that url parameter to use the page_id
, which is unique. I modified my CFC to use the new key, and nothing worked. So I started going through my code and figured I made a typo, started commenting things out, and finally dumped out my CFC object and voila, none of the edits I made were actually being used. This was fairly obvious, since page_name
was a string, and page_id
was numeric.
So I started googling,The first thing I saw as adjust things in the CFAdmin. I don't have access to it, and restarting the server isn't an option since I'm using an RDS to live code. The next thing I tried was to add applicationStop()
, onApplicationStart()
, to my Application.cfc
. Well the problem is that the Application.cfc, is actually an Application.cfm. So after fiddling with the <cfapplication ... >
tag, and nothing being updated, I'm here asking for help.
So is there a quick fix for this? Should I go ahead and create an application.cfc? I hope I explained myself, and sorry for all the text.
coldfusion - ColdFusion 通过 Struct 循环
我在 Application.cfm 中有这些代码:
我正在尝试利用该结构在 update-employee.cfm 上创建一个下拉列表,如下所示:
但是,下拉列表中没有填充数据。有什么建议么?谢谢。
coldfusion - 使用 application.cfm 中的 urlencode 检测 url ColdFusion 中的 XSS
我继承了一些遗留的 ColdFusion 代码,大约一年前,我的网站遭到 XSS 和 SQL 注入攻击。
这导致我验证输入以及在我的application.cfm
文件中包含 ScriptProtect="all" 的设置。我把它扫描了,结果很干净。
最近我再次对其进行了扫描,它发现了许多漏洞,特别是其中一个在 url 中嵌入了脚本的漏洞。
例如,这是附加到一个 url:
其中嵌入了隐藏的 JavaScript。如何使用文件URLencode()
中的ColdFusion 功能application.cfm
来检测/防止此类 XSS 攻击?
coldfusion - 用户数据有时会混淆
我正在建立一个网站,我在其中遵循 MVC 来管理我的代码,而不使用任何框架。我已将所有查询放入 cfcs 并在我的 Application.cfm 中对其进行初始化,并将它们存储在如下应用程序变量中:
为了执行任何查询操作,我创建了一个函数,然后像这样在任何地方调用它:
我不知道是什么导致了这个问题,但有时一个用户会访问另一个用户的数据。这怎么可能?它是在评估另一个用户的会话数据还是我初始化了 cfc 错误?
应用设置如下:
客户资料.cfc