Does anyone have some code that checks the page that the user entered from?
I know it's pretty simple to do, but I can't seem to find the right way to
do it. I just want to check the previous page to redirect if coming in from
the wrong page.
Also, is there anyway to do this for an exe to protect the download of an
exe? Thank you ver much in advance. 6 1326
arenaTR said: Does anyone have some code that checks the page that the user entered from? I know it's pretty simple to do, but I can't seem to find the right way to do it. I just want to check the previous page to redirect if coming in from the wrong page.
Also, is there anyway to do this for an exe to protect the download of an exe? Thank you ver much in advance.
The best way to do either of these is on the server, rather than in
Javascript in the page. Server-side code is the only way to protect
the exe. How to do it depends on what server-side capabilities you
have, and is probably beyond the scope of this newsgroup.
"Lee" <RE************ **@cox.net> wrote in message
news:c2******** *@drn.newsguy.c om... arenaTR said: Does anyone have some code that checks the page that the user entered
from?I know it's pretty simple to do, but I can't seem to find the right way
todo it. I just want to check the previous page to redirect if coming in
fromthe wrong page.
Also, is there anyway to do this for an exe to protect the download of an exe? Thank you ver much in advance.
The best way to do either of these is on the server, rather than in Javascript in the page. Server-side code is the only way to protect the exe. How to do it depends on what server-side capabilities you have, and is probably beyond the scope of this newsgroup.
Thank you very much for getting back to me. Good suggestion on the
server-side stuff. I'm not as concerned about that now as the client-side.
Is there any code I can use to prevent entry unless from a specified
location?
Thank you in advance again!
arenaTR wrote: Thank you very much for getting back to me. Good suggestion on the server-side stuff. I'm not as concerned about that now as the client-side. Is there any code I can use to prevent entry unless from a specified location?
Thank you in advance again!
Hmmmm... well, what Lee is suggesting is more important. For instance,
if I am not using a browser with javascript, what happens? If I use
that browser to get at the exe directly, what happens? These questions
can only be answered with a server-side solution.
But, as a client-side thing, you can use the document.referr er property
to decide how to hide a link, but there is still nothing stopping
someone from bypassing everything, and linking to the exe directly.
Brian
"Brian Genisio" <Br**********@y ahoo.com> wrote in message
news:40******** @10.10.0.241... arenaTR wrote:
Thank you very much for getting back to me. Good suggestion on the server-side stuff. I'm not as concerned about that now as the
client-side. Is there any code I can use to prevent entry unless from a specified location?
Thank you in advance again!
Hmmmm... well, what Lee is suggesting is more important. For instance, if I am not using a browser with javascript, what happens? If I use that browser to get at the exe directly, what happens? These questions can only be answered with a server-side solution.
But, as a client-side thing, you can use the document.referr er property to decide how to hide a link, but there is still nothing stopping someone from bypassing everything, and linking to the exe directly.
Brian
Brian:
Thanks so much for your help, it worked on the client side.
That was easy, though. Any ideas where I can learn about doing a
server-side check as well? Or perhaps I can learn from some sample code,
etc.? Thanks again everyone!
arenaTR wrote: "Brian Genisio" <Br**********@y ahoo.com> wrote in message news:40******** @10.10.0.241...
arenaTR wrote:
Thank you very much for getting back to me. Good suggestion on the server-side stuff. I'm not as concerned about that now as the client-side. Is there any code I can use to prevent entry unless from a specified location?
Thank you in advance again!
Hmmmm... well, what Lee is suggesting is more important. For instance, if I am not using a browser with javascript, what happens? If I use that browser to get at the exe directly, what happens? These questions can only be answered with a server-side solution.
But, as a client-side thing, you can use the document.referr er property to decide how to hide a link, but there is still nothing stopping someone from bypassing everything, and linking to the exe directly.
Brian
Brian:
Thanks so much for your help, it worked on the client side.
That was easy, though. Any ideas where I can learn about doing a server-side check as well? Or perhaps I can learn from some sample code, etc.? Thanks again everyone!
For server-side, it all depends on your server-side technology. For
PHP, I know that there is a structure that gives you the information
that the browser gives the server... I dont remember what it is called,
but it keeps the referrer value in it.
Brian
arenaTR wrote: Does anyone have some code that checks the page that the user entered from? I know it's pretty simple to do, but I can't seem to find the right way to do it. I just want to check the previous page to redirect if coming in from the wrong page.
Also, is there anyway to do this for an exe to protect the download of an exe? Thank you ver much in advance.
Arena,
Quite apart from the server-side scripting, but depending on what kind
of server you use, you could also try to protect the file against
hot-linking and bandwidth-theft (linking to the file from other sites
than your own and therefore using other people's bandwidth).
In a unix/linux apache environment, you can do this by placing a
..htaccess file in either the home directory of your site or the
subdirectory which you want to protect.
For more information, have a look at: http://www.javascriptkit.com/howto/htaccess10.shtml or http://www.htmlite.com/HTA013.php.
The examples they give are for images, but I would assume this will work
equally well for exe files.
Good luck, Juliette This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Rob Meade |
last post by:
Hi all,
I am allowing a user to create a directory within my application.
I have them entering the name for the directory in a form. When the form is
processed I initially check for any special characters that are not allowed
(Windows based server incidently), from here I then need to check to see
whether the folder name has already been used (either by a previous entry
using the application etc, or reserved names as such ie, /images...
|
by: R Bolling |
last post by:
I am using a routine to check to see if a phone number (PK) has alread
been entered, and takes the user to that record if it is found -- as
follows:
Private Sub Contact_telephone___BeforeUpdate(Cancel As Integer)
Dim rs As DAO.Recordset
Dim iAns As Integer
Set rs = Me.RecordsetClone
rs.FindFirst " = '" & Me! & "'"
If Not rs.NoMatch Then
|
by: kevinjouco |
last post by:
Hello
Have searched the group for a solution to the following problem without
success:
Table 1 has Ref No (No Duplicates) & Min Max Value Fields
ie Ref No 1 Min 1 Max 10
Ref No 2 Min 11 Max 20 etc
Table 2 is linked by Ref No (Allows Duplicates) & Recorded Value
|
by: Joey Lee |
last post by:
Hi,
I was wondering which is the best way of checking if a
record exist in the database before inserting.
There are quite a few ways I have seen. Here are some...
1> Insert and hit a primary key violation and then handle
it
|
by: sanjay123456 |
last post by:
Dear friends ,
I am using window os . i face a problem is that
$file="D:\Domains\\naturetrailsindia.info\wwwroot\html\\";
$file=$path."\html\\";
$d = dir($file);
| |
by: jacob navia |
last post by:
We hear very often in this discussion group that
bounds checking, or safety tests are too expensive
to be used in C.
Several researchers of UCSD have published an interesting
paper about this problem.
http://www.jilp.org/vol9/v9paper10.pdf
Specifically, they measured the overhead of a bounds
|
by: Kevin Frey |
last post by:
SQL Server allows for a user to have SELECT permission on a View without
that user requiring an associated SELECT permission on the underlying table
that the VIEW accesses, but the user can still access the data through the
View. A similar arrangement holds true for stored procedures.
So based on these initial known behaviours, I have a couple of questions:
1. If a stored procedure A executes stored procedure B, does the user of A...
|
by: scottrichardson |
last post by:
Hi guys.
Great site. This site has helped me many times before. But now I have a question to which I am yet to find an answer.
In a nutshell, I need to know how to check if a URL GET variable has been set, and if it has, to set the style of a DIV to display: block;
for instance: www.scott.com/competition.aspx?mode=entry
so.. the GET variable is mode and the value is entry
|
by: Orbie |
last post by:
Hi All,
I'm new to VB.NET and i'm looking for some help with my Windows Form. I need to check if a Commodity entered into (TextBox1.Text) already exists on my table before i insert it. I'm having issues checking if the number of rows returned from my Select is equal 0? Also i'm wondering should i be checking for an exception and open/closing my connections each time i make a call to my DB or is the way i have it coded below OK??
Any input...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |